I am trying to change the MaximumRowsOrColumns property of my WrapGrid as follows:
<GridView.ItemsPanel> <ItemsPanelTemplate> <WrapGrid x:Name="wrapGridItems" Orientation="Vertical" MaximumRowsOrColumns="1" /> </ItemsPanelTemplate> </GridView.ItemsPanel>
And then I use this code to modify the WrapGrid:
<VisualState x:Name="Snapped"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="wrapGridItems" Storyboard.TargetProperty="MaximumRowsOrColumns"> <DiscreteObjectKeyFrame KeyTime="0" Value="-1"/> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="headerText" Storyboard.TargetProperty="Text"> <DiscreteObjectKeyFrame KeyTime="0" Value="Pins"/> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState>
But I get an error
WinRT Info: Cannot resolve wrapGridItems TargetName.
How do I access the WrapGrid in the ObjectAnimationUsingKeyFrames Storyboard.TargetName property?
source share