Compartilhar via


Elemento ControlSizeDefinition

Representa o estilo de layout de um grupo de controles em um modelo personalizado.

Uso

<ControlSizeDefinition
  ImageSize = "xs:string"
  IsLabelVisible = "Boolean"
  IsImageVisible = "Boolean"
  IsPopup = "Boolean"
  ControlName = "xs:positiveInteger or xs:string"/>

Atributos

Atributo Type Obrigatório Descrição
Controlname
xs:positiveInteger ou xs:string
No
(xs:positiveInteger ou xs:string)
Uma cadeia de caracteres, um valor inteiro entre 2 e 59999, inclusive ou um valor hexadecimal entre 0x2 e 0xea5f, inclusive.
O valor deve ser exclusivo no documento XML da Faixa de Opções.
Comprimento máximo: 100 caracteres.
Imagesize
xs:string
No
Restrito a um dos seguintes valores:

(Grande)
(Pequeno)
Padrão.
IsImageVisible
Boolean
No
Restrito a um dos seguintes valores (0 e 1 não são válidos):

(true)
Padrão.
(false)
IsLabelVisible
Boolean
No
Restrito a um dos seguintes valores (0 e 1 não são válidos):

(true)
Padrão.
(false)
IsPopup
Boolean
No
Restrito a um dos seguintes valores (0 e 1 não são válidos):

(true)
(false)

Elementos filho

Não há elementos filho.

Elementos pai

Elemento
ControlGroup
GroupSizeDefinition
Linha

Comentários

Opcional.

Pode ocorrer uma ou mais vezes para cada elemento ControlGroup, Row ou SizeDefinition .

Exemplos

O exemplo de código a seguir demonstra a marcação básica de um modelo personalizado de layout SizeDefinition de quatro botões com vários elementos ControlSizeDefinition .

<Group CommandName="cmdButtonGroup2">
  <SizeDefinition>
    <ControlNameMap>
      <ControlNameDefinition Name="button1"/>
      <ControlNameDefinition Name="button2"/>
      <ControlNameDefinition Name="button3"/>
      <ControlNameDefinition Name="button4"/>
    </ControlNameMap>
    <GroupSizeDefinition Size="Large">
      <ControlGroup>
        <ControlSizeDefinition ControlName="button1"
                               ImageSize="Large"
                               IsLabelVisible="true" />
        <ControlSizeDefinition ControlName="button2"
                               ImageSize="Large"
                               IsLabelVisible="true" />
      </ControlGroup>
      <ColumnBreak ShowSeparator="true"/>
      <ControlGroup>
        <ControlSizeDefinition ControlName="button3"
                               ImageSize="Large"
                              IsLabelVisible="true" />
        <ControlSizeDefinition ControlName="button4"
                              ImageSize="Large"
                              IsLabelVisible="true" />
      </ControlGroup>
    </GroupSizeDefinition>
    <GroupSizeDefinition Size="Medium">
      <Row>
        <ControlSizeDefinition ControlName="button1"
                               ImageSize="Small"
                               IsLabelVisible="true" />
        <ControlSizeDefinition ControlName="button3"
                               ImageSize="Small"
                               IsLabelVisible="true" />
      </Row>
      <Row>
        <ControlSizeDefinition ControlName="button2"
                               ImageSize="Small"
                               IsLabelVisible="true" />
        <ControlSizeDefinition ControlName="button4"
                               ImageSize="Small"
                               IsLabelVisible="true" />
      </Row>
    </GroupSizeDefinition>
    <GroupSizeDefinition Size="Small">
      <Row>
        <ControlSizeDefinition ControlName="button1"
                               ImageSize="Small"
                               IsLabelVisible="true" />
        <ControlSizeDefinition ControlName="button3"
                               ImageSize="Small"
                               IsLabelVisible="false" />
      </Row>
      <Row>
        <ControlSizeDefinition ControlName="button2"
                               ImageSize="Small"
                               IsLabelVisible="true" />
        <ControlSizeDefinition ControlName="button4"
                               ImageSize="Small"
                               IsLabelVisible="false" />
      </Row>
    </GroupSizeDefinition>
  </SizeDefinition>
  <Button CommandName="cmdButtonG21"></Button>
  <Button CommandName="cmdButtonG22"></Button>
  <Button CommandName="cmdButtonG23"></Button>
  <Button CommandName="cmdButtonG24"></Button>
</Group>
<Group CommandName="cmdCheckBoxGroup">
  <CheckBox CommandName="cmdCheckBox"></CheckBox>
</Group>
<Group CommandName="cmdToggleButtonGroup"
       SizeDefinition="OneButton">
  <ToggleButton CommandName="cmdToggleButton"></ToggleButton>
</Group>
<Group CommandName="cmdButtonGroup"
       SizeDefinition="ThreeButtons">
  <Button CommandName="cmdButton1"></Button>
  <Button CommandName="cmdButton2"></Button>
  <Button CommandName="cmdButton3"></Button>
</Group>

Informações do elemento

  • Sistema mínimo com suporte: Windows 7
  • Pode estar vazio: Sim

Confira também

Personalizando uma faixa de opções por meio de definições de tamanho e políticas de dimensionamento