0

これらの LayoutAwarePage が実際にページの状態をどのように変更するかを理解しようとしています。

向きが変わると、次のハンドラーが呼び出されました。

           this.InvalidateVisualState()

呼び出しが XAML で正しいビュー ステートにマップされる方法を理解しようとしていますか? いえ

<!– Visual states reflect the application’s view state –&gt; 
<VisualStateGroup x:Name="ApplicationViewStates"> 

    <VisualState x:Name="FullScreenLandscape"> 
        .
        .
        .             
    </VisualState> 

    <VisualState x:Name="Filled"> 
        .
        .
        .      
    </VisualState> 

    <!– The entire page respects the narrower 100-pixel margin convention for portrait –&gt; 
    <VisualState x:Name="FullScreenPortrait"> 
        .
        .
        .      
     </VisualState> 

    <!– The back button and title have different styles when snapped –&gt; 
    <VisualState x:Name="Snapped"> 
        .
        .
        .      
     </VisualState> 
</VisualStateGroup> 

どうやら何をしていたとしても、VisualStateManager 内で宣言された正しい視覚状態を解決できます。

VisualStateManager.GoToState(this,"Filled",false)また、たとえば単に呼び出すのではなく、ビジュアル状態を無効にするのはなぜ ですか? InvalidateVisualState は他に何をしていますか?

4

1 に答える 1