अंग्रेज़ी में पढ़ें संपादित करें

इसके माध्यम से साझा किया गया


ToolBarTray.ToolBars Property

Definition

Gets the collection of ToolBar elements in the ToolBarTray.

public System.Collections.ObjectModel.Collection<System.Windows.Controls.ToolBar> ToolBars { get; }

Property Value

A collection of ToolBar objects.

Examples

The following example shows how to use the ToolBars property to add a ToolBar to a ToolBarTray.

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

Remarks

You can add ToolBar objects to a ToolBarTray by using XAML, but do not use object element syntax. That is, do not explicitly specify the Collection<T> object. XAML does not support declaring generic types.

XAML Property Element Usage

<object>  
  OneOrMoreToolBarElements  
</object>  

XAML Values

OneOrMoreToolBarElements
One or more ToolBar objects.

Applies to

उत्पाद संस्करण
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also