This documentation is archived and is not being maintained.

Popup.AllowsTransparency Property

Gets or sets whether a Popup control can contain transparent content.

Namespace: System.Windows.Controls.Primitives
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:

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" .../>

Property Value

true if the Popup control can contain transparent content; otherwise, false. The default value is false.

Identifier field


Metadata properties set to true


A Popup control can only contain transparent content when the application runs with full trust. An application that runs with full trust has complete access to system resources and is typically installed on the local system. For more information, see Security.

This property cannot be set to true when the Popup is hosted in a XAML browser application (XBAP).

If the AllowsTransparency property is set to true in an application that does not run in full trust, the AllowsTransparency property value is changed to false. An application that is hosted in a browser is an example of an application that does not run in full trust.

The following example shows how to set the AllowsTransparency property on a Popup control.

<DockPanel  Width="500" Background="Aqua">
  <Popup Placement="Center" PlacementRectangle="0,0,30,50"  
          IsOpen ="True" AllowsTransparency="True"
    <TextBlock Background="Purple">Popup Text</TextBlock>

myPopup.AllowsTransparency = true;

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0