Window.AllowsTransparency 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 or sets a value that indicates whether a window's client area supports transparency.
public:
property bool AllowsTransparency { bool get(); void set(bool value); };
public bool AllowsTransparency { get; set; }
member this.AllowsTransparency : bool with get, set
Public Property AllowsTransparency As Boolean
Property Value
true
if the window supports transparency; otherwise, false
.
Exceptions
A window that has a WindowStyle value of anything other than None.
Remarks
When the Background property of a window is set to a transparent color, using Transparent for example, the window remains opaque. This means that the desktop and any running applications "beneath" the window cannot be seen. To enable this type of transparency, AllowsTransparency must be set to true
.
AllowsTransparency exists to facilitate the creation of non-rectangular windows, and, consequently, when AllowsTransparency is set to true
, a window's WindowStyle property must be set to None.
Dependency Property Information
Identifier field | AllowsTransparencyProperty |
Metadata properties set to true |
None |
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈