Exportar (0) Imprimir
Expandir todo

MenuItem.IsSubmenuOpen (Propiedad)

Gets or sets a value that indicates whether the submenu containing the MenuItem control's children is open.

Espacio de nombres: System.Windows.Controls
Ensamblado: PresentationFramework (en presentationframework.dll)
Espacio de nombres XML:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

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

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

public function get IsSubmenuOpen () : boolean

public function set IsSubmenuOpen (value : boolean)

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

Valor de propiedad

Default value is false.

When IsSubmenuOpen is set to true, mouse capture is set to the MenuItem and its subtree.

The following example shows how to use the IsSubmenuOpen property to determine whether a submenu is open.

private void OnSubmenuOpened(object sender, RoutedEventArgs e)
{
    if (submenu.IsSubmenuOpen == true)
    {
        btn.Content = "Submenu is open.";
    }
}

Microsoft .NET Framework 3.0 es compatible con Windows Vista, Microsoft Windows XP SP2 y Windows Server 2003 SP1.

.NET Framework

Compatible con: 3.0

Adiciones de comunidad

AGREGAR
Mostrar:
© 2014 Microsoft