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
20
Does the XamTilesControl support something like an IsSelected state for a tile
posted

Hello,

we want to use XamTilesControl for a complex view where lots of controls change the state of a given "document" (a tile). To implement this we need a way to obtain the selected tile. We also need a graphical accentuation for the selected tile. As far as I can see this is possible with the XamDataCards control but it lacks the support for moving cards.

So we need the feature set of XamTilesControl with the possibility to have a selected tile. Is there any way to achieve this?

 

Thanks in advance

Parents
No Data
Reply
  • 69686
    posted

    Hello,

    The XamTilesControl is a derived ItemsControl so it does not support selection. What you can do to mimic selection is to create an attached property for the Tiles or the xamTilesControl and use it: For example, you an create an attached property for the XamTilesControl and set it for the tile when you clck on it (PreviewMouseLeftButtonDown event). I have attached sample with a simple implementation of this suggestion.

     

     

     

     

     

    XamTilesControl_SelectedItem.zip
Children