WindowChrome.GlassFrameThickness WindowChrome.GlassFrameThickness WindowChrome.GlassFrameThickness WindowChrome.GlassFrameThickness Property

定义

获取或设置一个值,该值表示窗口周围透明边框的宽度。Gets or sets a value that indicates the width of the glass border around a window.

public:
 property System::Windows::Thickness GlassFrameThickness { System::Windows::Thickness get(); void set(System::Windows::Thickness value); };
public System.Windows.Thickness GlassFrameThickness { get; set; }
member this.GlassFrameThickness : System.Windows.Thickness with get, set
Public Property GlassFrameThickness As Thickness

属性值

窗口周围玻璃边框的宽度。The width of the glass border around a window.

注解

GlassFrameThickness设置属性以指定 Windows Aero 玻璃框架扩展到窗口的工作区中的量。Set the GlassFrameThickness property to specify the amount that the Windows Aero glass frame extends into the client area of a window. 默认情况下, 玻璃帧将使用系统值来模拟标准窗口的外观。By default, the glass frame will use system values to emulate the look of a standard window. 如果启用了 Windows Aero, 则会启用标准标题按钮 (最大化、最小化和关闭), 并进行交互。If Windows Aero is enabled, then the standard caption buttons (Maximize, Minimize, Close) are enabled and interactive. 若要使自定义窗口不具有玻璃框架, 请将此粗细设置为统一值0。To make a custom window that does not have a glass frame, set this thickness to a uniform value of 0. 这将禁用标准标题按钮。This will disable the standard caption buttons.

若要扩展玻璃帧以覆盖整个窗口, 请将GlassFrameThickness属性设置为任意一侧的负值。To extend the glass frame to cover the entire window, set the GlassFrameThickness property to a negative value on any side. 如果任何GlassFrameThickness一侧的属性都设置为负值, 则其强制值将GlassFrameCompleteThickness等于。If the GlassFrameThickness property is set to a negative value for any side, its coerced value will be equal to GlassFrameCompleteThickness. GlassFrameCompleteThickness属性作为一个实用工具提供, 可让你将玻璃框的宽度设置为一个已命名的属性, 该属性可在整个窗口内扩展玻璃。The GlassFrameCompleteThickness property is provided as a utility to enable you to set the thickness of the glass frame to a named property that extends the glass over the entire window.

并非所有操作系统都支持 Windows Aero 玻璃效果, 可在支持的操作系统上禁用它。Windows Aero glass effects are not supported on all operating systems, and can be disabled on supported operating systems. 如果 Windows Aero 不可用, 则不会显示玻璃框架, 无论GlassFrameThickness属性值如何。If Windows Aero is not available, the glass frame will not be displayed regardless of the GlassFrameThickness property value. 你应检查IsGlassEnabled属性以验证是否可以使用 Windows Aero 玻璃效果。You should check the IsGlassEnabled property to verify that Windows Aero glass effects are available. 如果玻璃效果不可用, 则应提供不使用玻璃帧的替代窗口样式。If glass effects are not available, you should provide an alternate window style that does not use the glass frame.

依赖项属性信息Dependency Property Information

标识符字段Identifier field GlassFrameThicknessProperty
元数据属性设置为trueMetadata properties set to true NoneNone

适用于