Button 요소

단추 컨트롤을 나타냅니다.

사용량

<Button
  ApplicationModes = "xs:string"
  CommandName = "xs:positiveInteger or xs:string"
  ApplicationDefaults.IsChecked = "Boolean"/>

특성

attribute Type 필수 설명
ApplicationDefaults.IsChecked
부울

이 특성은 Button 요소가 QuickAccessToolbar.ApplicationDefaults의 자식인 경우에만 유효합니다.
다음 값 중 하나로 제한됨:

(true)
기본값
(false)
ApplicationModes
xs:string
No
MenuGroup이 부모 요소인 경우에만 유효합니다.

(xs:string)
0에서 31 사이의 쉼표로 구분된 정수 목록을 포함하는 문자열입니다.
공백은 유효하고 무시됩니다.
최대 길이: 250자.
CommandName
xs:positiveInteger 또는 xs:string
No
요소를 Command와 연결합니다.

(xs:positiveInteger 또는 xs:string)
문자열, 2에서 59999 사이의 정수 값( 포함) 또는 0x2 및 0xea5f 사이의 16진수 값(포함)입니다.
값은 리본 XML 문서 내에서 고유해야 합니다.
최대 길이: 100자.

자식 요소

자식 요소가 없습니다.

부모 요소

요소
ControlGroup
DropDownButton
DropDownGallery
그룹
MenuGroup
QuickAccessToolbar.ApplicationDefaults
SplitButton
SplitButton.ButtonItem
SplitButtonGallery

설명

선택 사항입니다.

SplitButton.ButtonItem 요소에 대해 최대 한 번 발생할 수 있습니다.

ControlGroup, DropDownButton, DropDownGallery, Group, MenuGroup, QuickAccessToolbar.ApplicationDefaults, SplitButton 또는 SplitButtonGallery 요소에 대해 하나 이상 발생할 수 있습니다.

단추애플리케이션 메뉴의 왼쪽 열에서 호스팅되는 애플리케이션 모드를 지원합니다.

예제

다음 예제에서는 단추의 기본 태그를 보여 줍니다.

이 코드 섹션에서는 Button 요소의 부모 컨테이너 역할을 하는 연결된 그룹이 있는 Button 명령 선언을 보여 줍니다.

<!-- Button -->
<Command Name="cmdButtonGroup"
         Symbol="cmdButtonGroup"
         Comment="Button Group"
         LabelTitle="ButtonGroup"/>
<Command Name="cmdButton1"
         Symbol="cmdButton1"
         Comment="Button1"
         LabelTitle="Button1"/>
<Command Name="cmdButton2"
         Symbol="cmdButton2"
         Comment="Button2"
         LabelTitle="Button2"/>
<Command Name="cmdButton3"
         Symbol="cmdButton3"
         Comment="Button3"
         LabelTitle="Button3"/>
<Command Name="cmdButtonGroup2"
         Symbol="cmdButtonGroup2"
         Comment="Button Group2"
         LabelTitle="ButtonGroup2"/>
<Command Name="cmdButtonG21"
         Symbol="cmdButtonG21"
         Comment="ButtonG21"
         LabelTitle="ButtonG21">
  <Command.LargeImages>
    <Image Source="res/large.bmp"/>
  </Command.LargeImages>
  <Command.SmallImages>
    <Image Source="res/small.bmp"/>
  </Command.SmallImages>
</Command>
<Command Name="cmdButtonG22"
         Symbol="cmdButtonG22"
         Comment="ButtonG22"
         LabelTitle="ButtonG22">
  <Command.LargeImages>
    <Image Source="res/large.bmp"/>
  </Command.LargeImages>
  <Command.SmallImages>
    <Image Source="res/small.bmp"/>
  </Command.SmallImages>
</Command>
<Command Name="cmdButtonG23"
         Symbol="cmdButtonG23"
         Comment="ButtonG23"
         LabelTitle="ButtonG23">
  <Command.LargeImages>
    <Image Source="res/large.bmp"/>
  </Command.LargeImages>
  <Command.SmallImages>
    <Image Source="res/small.bmp"/>
  </Command.SmallImages>
</Command>
<Command Name="cmdButtonG24"
         Symbol="cmdButtonG24"
         Comment="ButtonG24"
         LabelTitle="ButtonG24">
  <Command.LargeImages>
    <Image Source="res/large.bmp"/>
  </Command.LargeImages>
  <Command.SmallImages>
    <Image Source="res/small.bmp"/>
  </Command.SmallImages>
</Command>

이 코드 섹션에서는 Button 컨트롤 선언을 보여 줍니다.

<Group CommandName="cmdButtonGroup"
       SizeDefinition="ThreeButtons">
  <Button CommandName="cmdButton1"></Button>
  <Button CommandName="cmdButton2"></Button>
  <Button CommandName="cmdButton3"></Button>
</Group>

요소 정보

  • 지원되는 최소 시스템: Windows 7
  • 비워 둘 수 있음: 예

추가 정보

단추 컨트롤

SetModes