How to find the control in the ItemsControls in C++?
Posted: 02 Mar 2018, 05:36
How to find the TouchButton List?
I need to find every TouchButton for Binding event in view code. so I think should get the all TouchButton in the WrapPanel
seems like this but in C++
https://stackoverflow.com/questions/603 ... he-itemtem
I need to find every TouchButton for Binding event in view code. so I think should get the all TouchButton in the WrapPanel
seems like this but in C++
https://stackoverflow.com/questions/603 ... he-itemtem
Code: Select all
<ItemsControl x:Name="SpellListTemplate" ItemsSource="{Binding SpellList}" Width="800" Height="150" HorizontalAlignment="Center" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5" Canvas.Left="250" Canvas.Top="500" HorizontalContentAlignment="Center" VerticalContentAlignment="Bottom">
<ItemsControl.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform X="0.5" Y="0.5"/>
</TransformGroup>
</ItemsControl.RenderTransform>
<ItemsControl.ItemTemplate>
<DataTemplate>
<WrapPanel x:Name="SpellListWrapPanel" Width="800" Height="200">
<local:TouchButton Content="SpellButton" FontSize="48" Width="100" Height="100" Foreground="#FFF00202"/>
</WrapPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>