I have a ListBox with an ItemsPanel
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel x:Name="ThumbListStack" Orientation="Horizontal" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
I am wanting to move the Stack Panel along the X-axis using a TranslateTransform in code behind.
Problem is, I can't find the Stack Panel.
ThumbListBox.FindName("ThumbListStack")
Returns nothing.
I want to use it in:
Storyboard.SetTarget(x, ThumbListBox.FindName("ThumbListStack"))
How do I get the Stack Panel so I can then use it with the TranslateTransform
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…