This documentation is archived and is not being maintained.

Popup.IsOpen Property

Gets or sets whether the Popup is visible.

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

[BindableAttribute(true)] 
public bool IsOpen { get; set; }
/** @property */
public boolean get_IsOpen ()

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

public function get IsOpen () : boolean

public function set IsOpen (value : boolean)

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

Property Value

true if the Popup is visible; otherwise, false. The default value is false.

Identifier field

IsOpenProperty

Metadata properties set to true

None

If a control uses a Popup as part of its default style, bind the IsOpen property of the Popup to a property of the control. For example, a ComboBox can bind its IsDropDownOpen property to the IsOpen property of the Popup. This simplifies the logic for controlling when the Popup is visible.

The following example shows how to set the IsOpen property.

<Popup Name="myPopupIsOpen" IsOpen="True" 
       HorizontalOffset=".5cm" VerticalOffset="1cm">
  <TextBlock Background="Yellow">Popup Text</TextBlock>
</Popup>

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
Show: