NavigationView.CompactPaneLength Property


Gets or sets the width of the NavigationView pane in its compact display mode.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.NavigationView.CompactPaneLength (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

 property double CompactPaneLength { double get(); void set(double value); };
double CompactPaneLength();

void CompactPaneLength(double value);
public double CompactPaneLength { get; set; }
var double = navigationView.compactPaneLength;
navigationView.compactPaneLength = double;
Public Property CompactPaneLength As Double
<NavigationView CompactPaneLength="double" .../>

Property Value



The width of the pane in its compact display mode. The default is 48 device-independent pixel (DIP).


This property specifies the width of the pane when DisplayMode is Compact and IsPaneOpen is false.

Applies to