UWP - Prevent NavigationViewItemHeader from being clipped

后端 未结 2 738
清酒与你
清酒与你 2021-01-21 11:08

I am writing a UWP app that has a NavigationView containing NavigationViewItemHeaders:



        
2条回答
  •  独厮守ぢ
    2021-01-21 11:53

    Solution 1

    Increase the left margin of item headers:

    
    ...
    
    

    Solution 2

    Disable compact and expanded display mode of the NavigationView by setting the CompactModeThresholdWidth and ExpandedModeThresholdWidth to some big number:

    
    

    Solution 3

    Bind the Visibility property of item headers to the IsPaneOpen property of the NavigationView as André B suggested, only use x:Bind instead of Binding since it doesn't need a converter:

    
        ...
                
        ...
                
        ...
    
    

提交回复
热议问题