ToolBar.Band Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates where the toolbar should be located in the ToolBarTray.
public:
property int Band { int get(); void set(int value); };
public int Band { get; set; }
member this.Band : int with get, set
Public Property Band As Integer
Property Value
The band of the ToolBarTray in which the toolbar is positioned. The default is 0.
Examples
The following example shows how use this property to place ToolBar controls inside a ToolBarTray.
<ToolBarTray Background="White">
<ToolBar Band="1" BandIndex="1">
<Button>
<Image Source="toolbargraphics\cut.bmp" />
</Button>
<Button>
<Image Source="toolbargraphics\copy.bmp" />
</Button>
<Button>
<Image Source="toolbargraphics\paste.bmp" />
</Button>
</ToolBar>
<ToolBar Band="2" BandIndex="1">
<Button>
<Image Source="toolbargraphics\undo.bmp" />
</Button>
<Button>
<Image Source="toolbargraphics\redo.bmp" />
</Button>
</ToolBar>
<ToolBar Band="2" BandIndex="2">
<Button>
<Image Source="toolbargraphics\paint.bmp" />
</Button>
<Button>
<Image Source="toolbargraphics\spell.bmp" />
</Button>
<Separator/>
<Button>
<Image Source="toolbargraphics\save.bmp" />
</Button>
<Button>
<Image Source="toolbargraphics\open.bmp" />
</Button>
</ToolBar>
</ToolBarTray>
Remarks
The position of the ToolBar in a ToolBarTray depends on the values of the ToolBarTray.Orientation, Band, and BandIndex properties. When Orientation is set to Horizontal, a band represents a row in the ToolBarTray. When Orientation is Vertical, a band represents a column of the ToolBarTray. The following table describes the relationship between Orientation, Band, and BandIndex.
Orientation | Band | BandIndex |
---|---|---|
Horizontal | Indicates the row in which the ToolBar is positioned. Toolbars that have Band set to a smaller value are above those with a larger value. | Indicates the position of the ToolBar on the Band. Toolbars that have BandIndex set to a smaller value are to the left of those with a larger value. |
Vertical | Indicates the column in which the ToolBar is positioned. Toolbars that have Band set to a smaller value are to the left of those with a larger value. | Indicates the position of the ToolBar on the Band. Toolbars that have BandIndex set to a smaller value are above those with a larger value. |
Dependency Property Information
Identifier field | BandProperty |
Metadata properties set to true |
AffectsParentMeasure |
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기