Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
575
DataTemplate for different states
posted

Hello,

I want to know if is it possible to define DataTemplates for the different states (XamTilesControl.ItemTemplate, XamTilesControl.ItemTemplateMaximized, XamTilesControl.ItemTemplateMinimizedExpanded and XamTilesControl.ItemTemplateMinimizedExpanded) for usage with ItemTemplateSelector?

My Templates that I've defined take effect to all Tiles in all states! ;o(

Many thanks and greets from germany...
Marco

Parents
No Data
Reply
  • 69686
    Suggested Answer
    posted

    Hello Marco,

    Currently, the ItemTemplateSelector (inherited from ItemsControl) selects only the ItemTemplate of the XamTilesControl.

    What you could do is bind the maximized/minimized templates to the ItemTemplate :

    <igTiles:XamTilesControl DataContext="{Binding}" 

    ItemTemplate="{DynamicResource MyItemTemplate}"

    ItemTemplateMinimizedExpanded="{Binding ItemTemplate, RelativeSource={RelativeSource Self}}"

    ItemTemplateMaximized="{Binding ItemTemplate, RelativeSource={RelativeSource Self}}"

    ItemsSource="{Binding Collection}" 

    ItemContainerStyle="{DynamicResource TileStyle}"/>

Children
No Data