Skip to content

Instantly share code, notes, and snippets.

@ceee
Last active August 29, 2015 13:56
Show Gist options
  • Save ceee/9111190 to your computer and use it in GitHub Desktop.
Save ceee/9111190 to your computer and use it in GitHub Desktop.
<phone:Panorama.TitleTemplate>
<DataTemplate>
<!-- You have to assign a width here as the Canvas has no impact on the layout, and therefore it won't stretch the Grid to match it's siblings width.
As the Grid has a calculated width of 0 in your code example, it will get repeated faster (which is visible to you). The problem with the TitleTemplate is, that you can't set HorizontalAlignment="Stretch" (for 100% width), as it won't work here :-S
If you increase the Width, the Logo will move faster, therefore you will get a faster parallax movement -->
<Grid Margin="0,34,0,0" Width="240" Height="134.218">
<!-- I have also removed the Canvas Background, as it won't work anymore with the added width. Just set a Background for the Panorama itself, this will get around this issue (Panorama.Background) -->
<Canvas x:Name="DivvyLogoBranding">
<Path Data="F1M0,0L0,73.195 25.669,0z"
Fill="#FF05532D"
Height="73.195"
Canvas.Left="69.97"
Canvas.Top="0"
Width="25.669" />
<Path Data="F1M0,73.195L47.821,8.817 25.669,0z"
Fill="#FF3FC786"
Height="73.195"
Canvas.Left="69.97"
Canvas.Top="0"
Width="47.821" />
<Path Data="F1M43.325,68.874C41.951,69.943,40.268,70.674,38.275,71.068L38.275,57.51C40.794,58.382 42.608,59.313 43.719,60.304 44.83,61.295 45.385,62.704 45.385,64.531 45.385,66.358 44.699,67.805 43.325,68.874 M31.165,34.585C28.574,33.749 26.723,32.931 25.613,32.131 24.502,31.331 23.947,30.167 23.947,28.639 23.947,27.266 24.52,26.048 25.665,24.985 26.812,23.922 28.645,23.236 31.165,22.925z M65.731,53.615C64.466,50.851 62.687,48.471 60.394,46.477 58.101,44.483 55.352,42.794 52.146,41.409 49.311,40.184 46.234,39.052 42.918,38.014 45.13,34.99 47.423,31.896 48.174,30.949L66.25,30.949C65.916,24.089 63.841,18.765 60.024,14.977 53.122,23.784 34.59,49.235 34.59,49.235L34.59,0 31.165,0 31.165,6.878C27.116,7.033 23.335,7.618 19.818,8.633 16.302,9.648 13.227,11.081 10.594,12.931 7.962,14.782 5.899,17.087 4.406,19.845 2.914,22.603 2.168,25.797 2.168,29.427 2.168,33.737 2.857,37.268 4.236,40.021 5.615,42.773 7.565,45.056 10.084,46.871 12.603,48.686 15.6,50.218 19.075,51.465 22.55,52.713 26.431,53.94 30.717,55.146 30.788,55.229 30.938,55.271 31.165,55.271L31.165,71.068C28.645,70.531 26.643,69.429 25.155,67.764 23.669,66.098 22.77,63.761 22.46,60.752L0,60.752C0.144,69.241 2.95,75.796 8.418,80.417 13.887,85.038 21.469,87.653 31.165,88.262L31.165,98.578 34.59,98.578 38.275,98.578 38.275,88.262C42.406,88.035 46.247,87.345 49.799,86.193 53.351,85.041 56.447,83.429 59.086,81.357 61.724,79.286 63.809,76.752 65.337,73.754 66.866,70.758 67.63,67.307 67.63,63.403 67.63,59.641 66.997,56.379 65.731,53.615"
Fill="White"
Height="98.578"
Canvas.Left="35.378"
Canvas.Top="23.978"
Width="67.63" />
<Path Data="F1M25.669,0L47.821,8.817 0,73.195z"
Fill="#FF3CF49D"
Height="73.195"
Canvas.Left="69.97"
Canvas.Top="0"
Width="47.821" />
<Path Data="F1M44.524,0.001L0,59.918 0,76.53 54.162,5.03z"
Fill="Black"
Height="76.53"
Canvas.Left="69.97"
Opacity="0.302"
Canvas.Top="13.275"
Width="54.162" />
<Canvas x:Name="TextBlock"
Height="25.344"
Canvas.Left="120.999"
Canvas.Top="88.087"
Width="93.559">
<Path Data="F1M0,25.047C1.625,25.234 3.547,25.344 5.843,25.344 10.687,25.344 14.547,24.094 16.875,21.766 19.203,19.469 20.453,16.141 20.453,12.062 20.453,8.031 19.172,5.141 16.953,3.109 14.765,1.078 11.468,0 6.843,0 4.297,0 1.953,0.219 0,0.516L0,25.047 M3.218,2.891C4.062,2.703 5.328,2.562 7,2.562 13.797,2.562 17.125,6.297 17.093,12.172 17.093,18.906 13.359,22.75 6.468,22.75 5.218,22.75 4.031,22.719 3.218,22.578L3.218,2.891"
Fill="White"
Height="25.344"
Canvas.Left="0"
Canvas.Top="0"
Width="20.453" />
<Path Data="F1M0,0L0,24.938 3.218,24.938 3.218,0 0,0"
Fill="White"
Height="24.938"
Canvas.Left="24.975"
Canvas.Top="0.187"
Width="3.219" />
<Path Data="F1M11.703,24.938L20.61,0 17.172,0 12.953,12.329C11.844,15.579,10.813,18.719,10.11,21.61L10.032,21.61C9.375,18.688,8.438,15.657,7.375,12.282L3.485,0 0,0 8.141,24.938 11.703,24.938"
Fill="White"
Height="24.938"
Canvas.Left="31.265"
Canvas.Top="0.187"
Width="20.609" />
<Path Data="F1M11.703,24.938L20.61,0 17.172,0 12.953,12.329C11.844,15.579,10.813,18.719,10.11,21.61L10.032,21.61C9.375,18.688,8.438,15.657,7.375,12.282L3.485,0 0,0 8.141,24.938 11.703,24.938"
Fill="#FF0C6837"
Height="24.938"
Canvas.Left="52.79"
Canvas.Top="0.187"
Width="20.609" />
<Path Data="F1M11.141,24.938L11.141,14.313 19.5,0 15.828,0 12.25,6.875C11.281,8.766,10.438,10.391,9.734,12.032L9.656,12.032C8.875,10.282,8.141,8.766,7.172,6.875L3.656,0 0,0 7.875,14.36 7.875,24.938 11.141,24.938"
Fill="#FF0C6837"
Height="24.938"
Canvas.Left="74.059"
Canvas.Top="0.187"
Width="19.5" />
</Canvas>
</Canvas>
</Grid>
</DataTemplate>
</phone:Panorama.TitleTemplate>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment