NavigationViewTemplateSettings.OpenPaneLength Propiedad

Definición

Obtiene el min entre OpenPaneLength y el ancho de la ventana. Este es el valor calculado del ancho del panel cuando se abre y se expande completamente.

Esta documentación se aplica a WinUI 2 para UWP (para WinUI en el SDK de Aplicaciones para Windows, consulta los espacios de nombres SDK de Aplicaciones para Windows).

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

Valor de propiedad

Double

double

entre minOpenPaneLength y el ancho de la ventana. El valor predeterminado es 320.0.

Atributos
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

Ejemplos

En este ejemplo se muestra la NavigationViewTemplateSettings.OpenPaneLength propiedad que se usa en ControlTemplate para NavigationView pasarla a 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}">

Se aplica a