I am working in windows store apps and I need help.. I am trying to adapt my app for the differents visual state (FullScreenLandscape, FullScreenPortrait, Snapped, etc) and I need to reuse the controls for each visual state..
I create a grid for each visual state for example
<Grid x:Name="PortraitView" Visibility="Collapsed">
</Grid>
<Grid x:Name="FillView" Visibility="Visible">
</Grid>
<Grid x:Name="SnapView" Visibility="Collapsed">
</Grid>
but my problem is that I can not repeat the x:name of the controls that I set in the Grid= PortraitView..
how can I resolve it?
thanks
Clickevent handler or sameCommandbinding. - Filip SkakunDataContextof your page to an instance of the view model and in your view (page) set things like<TextBox Text="{Binding FieldText, Mode=TwoWay}"/>assuming your view model has a property called FieldText. Make sure the view model implements theINotifyPropertyChangedand raisesPropertyChangedevent in the property setter. - Filip Skakun