This is a migrated thread and some comments may be shown as answers.

Binding tile x:Name?

2 Answers 134 Views
TileList
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 03 Feb 2018, 02:23 PM
I'm trying to get the name of the tile when selected but because I'm binding my RadTileList to an observablecollection the tile's do not have that property set, is it possible to bind the tile x:Name property? 

2 Answers, 1 is accepted

Sort by
0
Joe
Top achievements
Rank 1
answered on 04 Feb 2018, 05:44 PM
I guess in looking further into this what's more important is setting a Command and CommandParameter for each tile??
0
Vladimir Stoyanov
Telerik team
answered on 07 Feb 2018, 11:22 AM
Hello Joe,

It is not possible to bind the x:Name property since it is not a DependencyProperty. Alternatively you can use FrameworkElement's Tag property. As for binding a command to the RadTiles, you can use an implicit style like so:
<Style TargetType="{x:Type telerik:Tile}" >
                <Setter Property="Command" Value="{Binding MyCommand}" />
                <Setter Property="CommandParameter" Value="{Binding MyCommandParameter}" />
</Style>

Please note that if you are using implicit styles, you will have to base the style on the theme's default one.

I hope this helps. Let me know if I can be of any further assistance.

Regards,
Vladimir Stoyanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
TileList
Asked by
Joe
Top achievements
Rank 1
Answers by
Joe
Top achievements
Rank 1
Vladimir Stoyanov
Telerik team
Share this question
or