ToolBarTray.ToolBars Propiedad

Definición

Obtiene la colección de elementos ToolBar en el control ToolBarTray.

public:
 property System::Collections::ObjectModel::Collection<System::Windows::Controls::ToolBar ^> ^ ToolBars { System::Collections::ObjectModel::Collection<System::Windows::Controls::ToolBar ^> ^ get(); };
public System.Collections.ObjectModel.Collection<System.Windows.Controls.ToolBar> ToolBars { get; }
member this.ToolBars : System.Collections.ObjectModel.Collection<System.Windows.Controls.ToolBar>
Public ReadOnly Property ToolBars As Collection(Of ToolBar)

Valor de propiedad

Collection<ToolBar>

Una colección de objetos ToolBar.

Ejemplos

En el ejemplo siguiente se muestra cómo usar la ToolBars propiedad para agregar un ToolBar objeto a .ToolBarTray

tbartray.ToolBars.Add(tbar);
tbartray.ToolBars.Add(tbar1);
tbartray.ToolBars.Add(tbar)
tbartray.ToolBars.Add(tbar1)

Comentarios

Puedes agregar ToolBar objetos a mediante ToolBarTray XAML, pero no usar la sintaxis de elementos de objeto. Es decir, no especifique explícitamente el Collection<T> objeto . XAML no admite la declaración de tipos genéricos.

Uso de elementos de propiedad XAML

<object>  
  OneOrMoreToolBarElements  
</object>  

Valores XAML

OneOrMoreToolBarElements
Uno o varios ToolBar objetos.

Se aplica a

Consulte también