(0) exportieren Drucken
Alle erweitern

Window.AllowsTransparency-Eigenschaft

Gets or sets the whether a window's client area supports transparency. This is a dependency property.

Namespace: System.Windows
Assembly: PresentationFramework (in presentationframework.dll)
XML-Namespaces:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public bool AllowsTransparency { get; set; }
/** @property */
public boolean get_AllowsTransparency ()

/** @property */
public void set_AllowsTransparency (boolean value)

public function get AllowsTransparency () : boolean

public function set AllowsTransparency (value : boolean)

<object AllowsTransparency="bool" .../>

Eigenschaftenwert

A Boolean object that specifies whether a window supports transparency.

Identifier field

AllowsTransparencyProperty

Metadata properties set to true

None

AusnahmetypBedingung

InvalidOperationException

AllowsTransparency is changed after a window has been shown.

InvalidOperationException

A window that has a WindowStyle value of anything other than None.

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.

For an example that demonstrates how to create a non-rectangular window using the AllowsTransparency property, see Non-Rectangular Windows Sample.

Microsoft .NET Framework 3.0 wird unter Windows Vista, Microsoft Windows XP SP2 und Windows Server 2003 SP1 unterstützt.

.NET Framework

Unterstützt in: 3.0
Anzeigen:
© 2014 Microsoft