Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
593 lines (552 sloc) 35.4 KB
<Type Name="ToolBarTray" FullName="System.Windows.Controls.ToolBarTray">
<TypeSignature Language="C#" Value="public class ToolBarTray : System.Windows.FrameworkElement, System.Windows.Markup.IAddChild" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi ToolBarTray extends System.Windows.FrameworkElement implements class System.Windows.Markup.IAddChild" />
<TypeSignature Language="DocId" Value="T:System.Windows.Controls.ToolBarTray" />
<TypeSignature Language="VB.NET" Value="Public Class ToolBarTray&#xA;Inherits FrameworkElement&#xA;Implements IAddChild" />
<TypeSignature Language="C++ CLI" Value="public ref class ToolBarTray : System::Windows::FrameworkElement, System::Windows::Markup::IAddChild" />
<TypeSignature Language="F#" Value="type ToolBarTray = class&#xA; inherit FrameworkElement&#xA; interface IAddChild" />
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Windows.FrameworkElement</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Windows.Markup.IAddChild</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.Windows.Markup.ContentProperty("ToolBars")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents the container that handles the layout of a <see cref="T:System.Windows.Controls.ToolBar" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A <xref:System.Windows.Controls.ToolBarTray> is responsible for handling placement, sizing, drag-and-drop operations, and rearranging of <xref:System.Windows.Controls.ToolBar> controls. <xref:System.Windows.Controls.ToolBarTray> controls are also responsible for managing the rows (or "bands") in which <xref:System.Windows.Controls.ToolBar> controls appear. A <xref:System.Windows.Controls.ToolBarTray> may be horizontal or vertical and, like a <xref:System.Windows.Controls.Menu>, is often docked at the top of an application window.
## Examples
The following example shows how to create a <xref:System.Windows.Controls.ToolBar> inside a <xref:System.Windows.Controls.ToolBarTray>. The example uses the <xref:System.Windows.Controls.ToolBar.BandIndex%2A> property to place tool bars inside tool bar trays.
[!code-xaml[ToolBarExample#2](~/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/Pane1.xaml#2)]
]]></format>
</remarks>
<altmember cref="T:System.Windows.Controls.Primitives.ToolBarOverflowPanel" />
<altmember cref="T:System.Windows.Controls.Primitives.ToolBarPanel" />
<altmember cref="T:System.Windows.Controls.ToolBarTray" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ToolBarTray ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.ToolBarTray.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; ToolBarTray();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Controls.ToolBarTray" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ArrangeOverride">
<MemberSignature Language="C#" Value="protected override System.Windows.Size ArrangeOverride (System.Windows.Size arrangeSize);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance valuetype System.Windows.Size ArrangeOverride(valuetype System.Windows.Size arrangeSize) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.ToolBarTray.ArrangeOverride(System.Windows.Size)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function ArrangeOverride (arrangeSize As Size) As Size" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Windows::Size ArrangeOverride(System::Windows::Size arrangeSize);" />
<MemberSignature Language="F#" Value="override this.ArrangeOverride : System.Windows.Size -&gt; System.Windows.Size" Usage="toolBarTray.ArrangeOverride arrangeSize" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Size</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="arrangeSize" Type="System.Windows.Size" />
</Parameters>
<Docs>
<param name="arrangeSize">The size that the <see cref="T:System.Windows.Controls.ToolBarTray" /> assumes to position its children.</param>
<summary>Called to arrange and size its <see cref="T:System.Windows.Controls.ToolBar" /> children.</summary>
<returns>The size of the control.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Background">
<MemberSignature Language="C#" Value="public System.Windows.Media.Brush Background { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Media.Brush Background" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.ToolBarTray.Background" />
<MemberSignature Language="VB.NET" Value="Public Property Background As Brush" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Media::Brush ^ Background { System::Windows::Media::Brush ^ get(); void set(System::Windows::Media::Brush ^ value); };" />
<MemberSignature Language="F#" Value="member this.Background : System.Windows.Media.Brush with get, set" Usage="System.Windows.Controls.ToolBarTray.Background" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Media.Brush</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a brush to use for the background color of the <see cref="T:System.Windows.Controls.ToolBarTray" />.</summary>
<value>A brush to use for the background color of the <see cref="T:System.Windows.Controls.ToolBarTray" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<a name="dependencyPropertyInfo_Background"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.Controls.ToolBarTray.BackgroundProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsRender%2A>, <xref:System.Windows.FrameworkPropertyMetadata.SubPropertiesDoNotAffectRender%2A>|
## Examples
The following example uses the <xref:System.Windows.Controls.ToolBarTray.Background%2A> property to set the brush for the background color of a <xref:System.Windows.Controls.ToolBarTray>.
[!code-xaml[ToolBarExample#ToolBarTrayIsLocked](~/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/Pane1.xaml#toolbartrayislocked)]
]]></format>
</remarks>
<altmember cref="T:System.Windows.Controls.Primitives.ToolBarOverflowPanel" />
<altmember cref="T:System.Windows.Controls.Primitives.ToolBarPanel" />
<altmember cref="T:System.Windows.Controls.ToolBarTray" />
</Docs>
</Member>
<Member MemberName="BackgroundProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty BackgroundProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty BackgroundProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.Controls.ToolBarTray.BackgroundProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly BackgroundProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ BackgroundProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable BackgroundProperty : System.Windows.DependencyProperty" Usage="System.Windows.Controls.ToolBarTray.BackgroundProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.Controls.ToolBarTray.Background" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetIsLocked">
<MemberSignature Language="C#" Value="public static bool GetIsLocked (System.Windows.DependencyObject element);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool GetIsLocked(class System.Windows.DependencyObject element) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.ToolBarTray.GetIsLocked(System.Windows.DependencyObject)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function GetIsLocked (element As DependencyObject) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool GetIsLocked(System::Windows::DependencyObject ^ element);" />
<MemberSignature Language="F#" Value="static member GetIsLocked : System.Windows.DependencyObject -&gt; bool" Usage="System.Windows.Controls.ToolBarTray.GetIsLocked element" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Windows.DependencyObject" />
</Parameters>
<Docs>
<param name="element">The element from which to read the property.</param>
<summary>Reads the value of the <see cref="P:System.Windows.Controls.ToolBarTray.IsLocked" /> property from the specified element.</summary>
<returns>
<see langword="true" /> if the toolbar cannot be moved inside the toolbar tray; otherwise, <see langword="false" />. The default is <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetVisualChild">
<MemberSignature Language="C#" Value="protected override System.Windows.Media.Visual GetVisualChild (int index);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Windows.Media.Visual GetVisualChild(int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.ToolBarTray.GetVisualChild(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function GetVisualChild (index As Integer) As Visual" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Windows::Media::Visual ^ GetVisualChild(int index);" />
<MemberSignature Language="F#" Value="override this.GetVisualChild : int -&gt; System.Windows.Media.Visual" Usage="toolBarTray.GetVisualChild index" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Media.Visual</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">Index of the visual child.</param>
<summary>Gets the index number of the visible child.</summary>
<returns>The index number of the visible child.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsLocked">
<MemberSignature Language="C#" Value="public bool IsLocked { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsLocked" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.ToolBarTray.IsLocked" />
<MemberSignature Language="VB.NET" Value="Public Property IsLocked As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IsLocked { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.IsLocked : bool with get, set" Usage="System.Windows.Controls.ToolBarTray.IsLocked" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that indicates whether a <see cref="T:System.Windows.Controls.ToolBar" /> can be moved inside a <see cref="T:System.Windows.Controls.ToolBarTray" />.</summary>
<value>
<see langword="true" /> if the toolbar cannot be moved inside the toolbar tray; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This dependency property also has an attached property usage.
<a name="xamlAttributeUsage_IsLocked"></a>
## XAML Attribute Usage
```
<object IsLocked="bool"/>
- or -
<object ToolBarTray.IsLocked="bool"/>
```
<a name="dependencyPropertyInfo_IsLocked"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.Controls.ToolBarTray.IsLockedProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsMeasure%2A>, <xref:System.Windows.FrameworkPropertyMetadata.Inherits%2A>|
## Examples
The following example shows how to create a <xref:System.Windows.Controls.ToolBarTray> that does not allow a <xref:System.Windows.Controls.ToolBar> to move inside it.
[!code-xaml[ToolBarExample#ToolBarTrayIsLocked](~/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/Pane1.xaml#toolbartrayislocked)]
]]></format>
</remarks>
<altmember cref="T:System.Windows.Controls.Primitives.ToolBarOverflowPanel" />
<altmember cref="T:System.Windows.Controls.Primitives.ToolBarPanel" />
<altmember cref="T:System.Windows.Controls.ToolBarTray" />
</Docs>
</Member>
<Member MemberName="IsLockedProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty IsLockedProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty IsLockedProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.Controls.ToolBarTray.IsLockedProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly IsLockedProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ IsLockedProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable IsLockedProperty : System.Windows.DependencyProperty" Usage="System.Windows.Controls.ToolBarTray.IsLockedProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.Controls.ToolBarTray.IsLocked" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="LogicalChildren">
<MemberSignature Language="C#" Value="protected internal override System.Collections.IEnumerator LogicalChildren { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.IEnumerator LogicalChildren" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.ToolBarTray.LogicalChildren" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides ReadOnly Property LogicalChildren As IEnumerator" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual property System::Collections::IEnumerator ^ LogicalChildren { System::Collections::IEnumerator ^ get(); };" />
<MemberSignature Language="F#" Value="member this.LogicalChildren : System.Collections.IEnumerator" Usage="System.Windows.Controls.ToolBarTray.LogicalChildren" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets an enumerator to the logical child elements of a <see cref="T:System.Windows.Controls.ToolBarTray" />.</summary>
<value>An enumerator to the children of a <see cref="T:System.Windows.Controls.ToolBarTray" /> element.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="MeasureOverride">
<MemberSignature Language="C#" Value="protected override System.Windows.Size MeasureOverride (System.Windows.Size constraint);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance valuetype System.Windows.Size MeasureOverride(valuetype System.Windows.Size constraint) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.ToolBarTray.MeasureOverride(System.Windows.Size)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function MeasureOverride (constraint As Size) As Size" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Windows::Size MeasureOverride(System::Windows::Size constraint);" />
<MemberSignature Language="F#" Value="override this.MeasureOverride : System.Windows.Size -&gt; System.Windows.Size" Usage="toolBarTray.MeasureOverride constraint" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Size</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="constraint" Type="System.Windows.Size" />
</Parameters>
<Docs>
<param name="constraint">The measurement constraints; a <see cref="T:System.Windows.Controls.ToolBarTray" /> cannot return a size larger than the constraint.</param>
<summary>Called to remeasure a <see cref="T:System.Windows.Controls.ToolBarTray" />.</summary>
<returns>The size of the control.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="OnRender">
<MemberSignature Language="C#" Value="protected override void OnRender (System.Windows.Media.DrawingContext dc);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void OnRender(class System.Windows.Media.DrawingContext dc) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.ToolBarTray.OnRender(System.Windows.Media.DrawingContext)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub OnRender (dc As DrawingContext)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void OnRender(System::Windows::Media::DrawingContext ^ dc);" />
<MemberSignature Language="F#" Value="override this.OnRender : System.Windows.Media.DrawingContext -&gt; unit" Usage="toolBarTray.OnRender dc" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Windows.Media.DrawingContext" />
</Parameters>
<Docs>
<param name="dc">Drawing context to use to render the <see cref="T:System.Windows.Controls.ToolBarTray" />.</param>
<summary>Called when a <see cref="T:System.Windows.Controls.ToolBarTray" /> is displayed to get the Drawing Context (DC) to use to render the <see cref="T:System.Windows.Controls.ToolBarTray" />.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Orientation">
<MemberSignature Language="C#" Value="public System.Windows.Controls.Orientation Orientation { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Controls.Orientation Orientation" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.ToolBarTray.Orientation" />
<MemberSignature Language="VB.NET" Value="Public Property Orientation As Orientation" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Controls::Orientation Orientation { System::Windows::Controls::Orientation get(); void set(System::Windows::Controls::Orientation value); };" />
<MemberSignature Language="F#" Value="member this.Orientation : System.Windows.Controls.Orientation with get, set" Usage="System.Windows.Controls.ToolBarTray.Orientation" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Controls.Orientation</ReturnType>
</ReturnValue>
<Docs>
<summary>Specifies the orientation of a <see cref="T:System.Windows.Controls.ToolBarTray" />.</summary>
<value>One of the <see cref="T:System.Windows.Controls.Orientation" /> values. The default is <see cref="F:System.Windows.Controls.Orientation.Horizontal" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<a name="dependencyPropertyInfo_Orientation"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.Controls.ToolBarTray.OrientationProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsParentMeasure%2A>|
## Examples
The following example shows how to use the <xref:System.Windows.Controls.Orientation> property to set the orientation of the tool bar tray; this determines the orientation of the tool bar.
[!code-xaml[ToolBarExample#4](~/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/Pane1.xaml#4)]
]]></format>
</remarks>
<altmember cref="T:System.Windows.Controls.Primitives.ToolBarOverflowPanel" />
<altmember cref="T:System.Windows.Controls.Primitives.ToolBarPanel" />
<altmember cref="T:System.Windows.Controls.ToolBarTray" />
</Docs>
</Member>
<Member MemberName="OrientationProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty OrientationProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty OrientationProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.Controls.ToolBarTray.OrientationProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly OrientationProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ OrientationProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable OrientationProperty : System.Windows.DependencyProperty" Usage="System.Windows.Controls.ToolBarTray.OrientationProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.Controls.ToolBarTray.Orientation" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SetIsLocked">
<MemberSignature Language="C#" Value="public static void SetIsLocked (System.Windows.DependencyObject element, bool value);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetIsLocked(class System.Windows.DependencyObject element, bool value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.ToolBarTray.SetIsLocked(System.Windows.DependencyObject,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub SetIsLocked (element As DependencyObject, value As Boolean)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static void SetIsLocked(System::Windows::DependencyObject ^ element, bool value);" />
<MemberSignature Language="F#" Value="static member SetIsLocked : System.Windows.DependencyObject * bool -&gt; unit" Usage="System.Windows.Controls.ToolBarTray.SetIsLocked (element, value)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Windows.DependencyObject" />
<Parameter Name="value" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="element">The element to write the property to.</param>
<param name="value">The property value to set.</param>
<summary>Writes the value of the <see cref="P:System.Windows.Controls.ToolBarTray.IsLocked" /> property to the specified element.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="System.Windows.Markup.IAddChild.AddChild">
<MemberSignature Language="C#" Value="void IAddChild.AddChild (object value);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Windows.Markup.IAddChild.AddChild(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.ToolBarTray.System#Windows#Markup#IAddChild#AddChild(System.Object)" />
<MemberSignature Language="VB.NET" Value="Sub AddChild (value As Object) Implements IAddChild.AddChild" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Windows.Markup.IAddChild.AddChild(System::Object ^ value) = System::Windows::Markup::IAddChild::AddChild;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Markup.IAddChild.AddChild(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">An object to add as a child.</param>
<summary>This type or member supports the [!INCLUDE[TLA#tla_winclient](~/includes/tlasharptla-winclient-md.md)] infrastructure and is not intended to be used directly from your code.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="System.Windows.Markup.IAddChild.AddText">
<MemberSignature Language="C#" Value="void IAddChild.AddText (string text);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Windows.Markup.IAddChild.AddText(string text) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.ToolBarTray.System#Windows#Markup#IAddChild#AddText(System.String)" />
<MemberSignature Language="VB.NET" Value="Sub AddText (text As String) Implements IAddChild.AddText" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Windows.Markup.IAddChild.AddText(System::String ^ text) = System::Windows::Markup::IAddChild::AddText;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Markup.IAddChild.AddText(System.String)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="text" Type="System.String" />
</Parameters>
<Docs>
<param name="text">A string to add to the object.</param>
<summary>This type or member supports the [!INCLUDE[TLA#tla_winclient](~/includes/tlasharptla-winclient-md.md)] infrastructure and is not intended to be used directly from your code.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ToolBars">
<MemberSignature Language="C#" Value="public System.Collections.ObjectModel.Collection&lt;System.Windows.Controls.ToolBar&gt; ToolBars { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.ObjectModel.Collection`1&lt;class System.Windows.Controls.ToolBar&gt; ToolBars" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.ToolBarTray.ToolBars" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ToolBars As Collection(Of ToolBar)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Collections::ObjectModel::Collection&lt;System::Windows::Controls::ToolBar ^&gt; ^ ToolBars { System::Collections::ObjectModel::Collection&lt;System::Windows::Controls::ToolBar ^&gt; ^ get(); };" />
<MemberSignature Language="F#" Value="member this.ToolBars : System.Collections.ObjectModel.Collection&lt;System.Windows.Controls.ToolBar&gt;" Usage="System.Windows.Controls.ToolBarTray.ToolBars" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Collections.ObjectModel.Collection&lt;System.Windows.Controls.ToolBar&gt;</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the collection of <see cref="T:System.Windows.Controls.ToolBar" /> elements in the <see cref="T:System.Windows.Controls.ToolBarTray" />.</summary>
<value>A collection of <see cref="T:System.Windows.Controls.ToolBar" /> objects.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can add <xref:System.Windows.Controls.ToolBar> objects to a <xref:System.Windows.Controls.ToolBarTray> by using XAML, but do not use object element syntax. That is, do not explicitly specify the <xref:System.Collections.ObjectModel.Collection%601> object. XAML does not support declaring generic types.
<a name="xamlPropertyElementUsage_Items"></a>
## XAML Property Element Usage
```
<object>
OneOrMoreToolBarElements
</object>
```
<a name="xamlValues_Items"></a>
## XAML Values
*OneOrMoreToolBarElements*
One or more <xref:System.Windows.Controls.ToolBar> objects.
## Examples
The following example shows how to use the <xref:System.Windows.Controls.ToolBarTray.ToolBars%2A> property to add a <xref:System.Windows.Controls.ToolBar> to a <xref:System.Windows.Controls.ToolBarTray>.
[!code-csharp[ToolBarOrient_snip#ToolBarTrayToolBars](~/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarOrient_snip/CSharp/Pane1.xaml.cs#toolbartraytoolbars)]
[!code-vb[ToolBarOrient_snip#ToolBarTrayToolBars](~/samples/snippets/visualbasic/VS_Snippets_Wpf/ToolBarOrient_snip/visualbasic/pane1.xaml.vb#toolbartraytoolbars)]
]]></format>
</remarks>
<altmember cref="T:System.Windows.Controls.Primitives.ToolBarOverflowPanel" />
<altmember cref="T:System.Windows.Controls.Primitives.ToolBarPanel" />
<altmember cref="T:System.Windows.Controls.ToolBarTray" />
</Docs>
</Member>
<Member MemberName="VisualChildrenCount">
<MemberSignature Language="C#" Value="protected override int VisualChildrenCount { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 VisualChildrenCount" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.ToolBarTray.VisualChildrenCount" />
<MemberSignature Language="VB.NET" Value="Protected Overrides ReadOnly Property VisualChildrenCount As Integer" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual property int VisualChildrenCount { int get(); };" />
<MemberSignature Language="F#" Value="member this.VisualChildrenCount : int" Usage="System.Windows.Controls.ToolBarTray.VisualChildrenCount" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the number of children that are currently visible.</summary>
<value>The number of visible <see cref="T:System.Windows.Controls.ToolBar" /> objects in the <see cref="T:System.Windows.Controls.ToolBarTray" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.