NavigationView.CompactPaneLength 属性

定义

获取或设置 NavigationView 窗格在其紧凑显示模式下的宽度。

public:
 property double CompactPaneLength { double get(); void set(double value); };
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="48.0")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="CoerceToGreaterThanZero")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="48.0")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="CoerceToGreaterThanZero")]
double CompactPaneLength();

void CompactPaneLength(double value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="48.0")]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="CoerceToGreaterThanZero")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="48.0")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="CoerceToGreaterThanZero")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="48.0")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="CoerceToGreaterThanZero")]
double CompactPaneLength();

void CompactPaneLength(double value);
public double CompactPaneLength { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="48.0")] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="CoerceToGreaterThanZero")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="48.0")] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="CoerceToGreaterThanZero")] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="48.0")]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="CoerceToGreaterThanZero")]
public double CompactPaneLength { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="48.0")] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="CoerceToGreaterThanZero")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="48.0")] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="CoerceToGreaterThanZero")] set; }
var double = navigationView.compactPaneLength;
navigationView.compactPaneLength = double;
Public Property CompactPaneLength As Double
<NavigationView CompactPaneLength="double" .../>

属性值

Double

double

窗格在其紧凑显示模式下的宽度。 默认值为 48 个与设备无关的像素 (DIP) 。

属性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallbackAttribute

注解

当 DisplayMode 为 Compact 且 IsPaneOpen 为 false 时,此属性指定窗格的宽度。

适用于