开发者

Adding tiles in the panorama page

Can we add tiles in one of the sections in panorama or i need to implement开发者_运维百科 it using button(changing the style of the button, so that it appears like a tile)


There is no tile control, so you'll have to create your own. You can do this by styling a button, like you said, or using an Image control.


There is no framework control that gives a tile layout. However, it is very easy to template Buttons so that they are simply rectangular squares of colour, allowing you to use them as tiles:

<DataTemplate x:Key="TileTemplate">
  <Button Width="160" Height="160"
          Margin="10">
    <Grid>
      <Rectangle Fill="{StaticResource PhoneAccentBrush}"/>

      <ContentPresenter Content="{TemplateBinding Content}"/>
    </Grid>
  </Button>
</DataTemplate>

You can then host them within a Silverlight Toolkit WrapPanel


This is an old post, but a project does now exist. Take a look at the TileSlider project

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜