ToolBar.BandIndex 속성

정의

밴드에서 도구 모음의 위치를 나타내는 밴드 인덱스 번호를 가져오거나 설정합니다.

public:
 property int BandIndex { int get(); void set(int value); };
public int BandIndex { get; set; }
member this.BandIndex : int with get, set
Public Property BandIndex As Integer

속성 값

Int32

ToolBarTray의 밴드에서 도구 모음의 위치입니다.

예제

다음 예제에서는 배치에이 속성을 사용 방법 ToolBar 내부의 컨트롤을 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>

설명

이 속성을 명시적으로 설정 하지 않으면 하는 경우 해당 값 나타나는 순서에 따라 결정 됩니다 합니다 ToolBar 에 설정 된는 ToolBarTray합니다. 예를 들어, 두 개의 도구 모음에 배치 하면를 ToolBarTray 설정 하지 않고는 Band 하 고 BandIndex 속성, 값 Band 두 도구 모음에 대 한 0이 됩니다. 변수의 BandIndex 첫 번째 도구 모음에 대 한 0과 두 번째 도구 모음에 대 한 1 됩니다.

위치를 ToolBarToolBarTray 의 값에 따라 달라 집니다를 ToolBarTray.Orientation, Band, 및 BandIndex 속성입니다. 때 Orientation 로 설정 된 Horizontal를 대역 외의 행을 나타냅니다는 ToolBarTray합니다. 때 Orientation 됩니다 Vertical, 밴드의 열을 나타냅니다는 ToolBarTray합니다. 다음 테이블 간의 관계를 설명 Orientation, Band, 및 BandIndex합니다.

방향 대역 외 밴드 인덱스
수평적 크기 조정 행을 나타냅니다는 ToolBar 배치 됩니다. 도구 모음에 있는 Band 보다 큰 값을 사용 하 여 높은 더 작은 값으로 설정 됩니다. 위치를 나타내는 합니다 ToolBarBand합니다. 도구 모음에 있는 BandIndex 더 큰 값을 가진 왼쪽에는 더 작은 값으로 설정 합니다.
Vertical 열을 나타냅니다는 ToolBar 배치 됩니다. 도구 모음에 있는 Band 더 큰 값을 가진 왼쪽에는 더 작은 값으로 설정 합니다. 위치를 나타내는 합니다 ToolBarBand합니다. 도구 모음에 있는 BandIndex 보다 큰 값을 사용 하 여 높은 더 작은 값으로 설정 됩니다.

종속성 속성 정보

식별자 필드 BandIndexProperty
메타 데이터 속성 설정 true AffectsParentMeasure

적용 대상

추가 정보