NavigationViewTemplateSettings.OpenPaneLength Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the min
between OpenPaneLength and the window's width.
This is the calculated value of the width of the pane when opened and fully expanded.
This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).
public:
property double OpenPaneLength { double get(); };
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="320.0")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="320.0")]
double OpenPaneLength();
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="320.0")]
public double OpenPaneLength { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="320.0")] get; }
Public ReadOnly Property OpenPaneLength As Double
Property Value
double
The min
between OpenPaneLength and the window's width. Defaults to 320.0.
- Attributes
-
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute
Examples
This example shows the NavigationViewTemplateSettings.OpenPaneLength
property being used in the ControlTemplate
for NavigationView
to pass through to the
Windows.UI.Xaml.Controls.SplitView.OpenPaneLength.
<ControlTemplate TargetType="NavigationView">
<!-- ... -->
<SplitView
OpenPaneLength="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.OpenPaneLength}"
Background="{TemplateBinding Background}"
BorderBrush="{ThemeResource NavigationViewItemSeparatorForeground}"
BorderThickness="{ThemeResource NavigationViewBorderThickness}"
CompactPaneLength="{TemplateBinding CompactPaneLength}"
DisplayMode="Inline"
IsPaneOpen="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsPaneOpen, Mode=TwoWay}"
IsTabStop="False"
PaneBackground="{ThemeResource NavigationViewDefaultPaneBackground}">