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

속성 값

의 밴드에 있는 도구 모음의 위치입니다 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 설정하지 않고 두 도구 모음에 BandBandIndex 배치하는 경우 두 도구 모음의 Band 값은 0이 됩니다. 값 BandIndex 은 첫 번째 도구 모음의 경우 0이고 두 번째 도구 모음의 경우 1입니다.

의 위치 ToolBar 는 , ToolBarTrayToolBarTray.Orientation 속성의 Band값에 따라 BandIndex 달라집니다. 로 Orientation설정되면 Horizontal 밴드는 .의 ToolBarTray행을 나타냅니다. 있는 경우 OrientationVertical밴드는 .ToolBarTray 다음 표에서는 , OrientationBand. 사이의 BandIndex관계를 설명합니다.

오리엔테이션 밴드 BandIndex
수평 위치가 지정된 행을 ToolBar 나타냅니다. 더 작은 값으로 설정된 도구 모음은 값이 더 큰 도구 모음 Band 보다 큽니다. 에서ToolBarBand 위치를 나타냅니다. 더 작은 값으로 설정된 도구 모음 BandIndex 은 값이 더 큰 도구 모음의 왼쪽에 있습니다.
세로 위치가 지정된 ToolBar 열을 나타냅니다. 더 작은 값으로 설정된 도구 모음 Band 은 값이 더 큰 도구 모음의 왼쪽에 있습니다. 에서ToolBarBand 위치를 나타냅니다. 더 작은 값으로 설정된 도구 모음은 값이 더 큰 도구 모음 BandIndex 보다 큽니다.

종속성 속성 정보

항목 가치
식별자 필드 BandIndexProperty
메타데이터 속성이 다음으로 설정됩니다. true AffectsParentMeasure

적용 대상

추가 정보