ControlSizeDefinition-Element

Stellt den Layoutstil einer Gruppe von Steuerelementen in einer benutzerdefinierten Vorlage dar.

Verbrauch

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

Attribute

attribute type Erforderlich BESCHREIBUNG
ControlName
xs:positiveInteger oder xs:string
Nein
(xs:positiveInteger oder xs:string)
Eine Zeichenfolge, ein ganzzahliger Wert zwischen 2 und 59999 inklusive oder ein Hexadezimalwert zwischen 0x2 und 0xea5f, inklusive.
Der Wert muss innerhalb des XML-Dokuments des Menübands eindeutig sein.
Maximale Länge: 100 Zeichen.
ImageSize
xs:string
Nein
Beschränkt auf einen der folgenden Werte:

(Groß)
(Klein)
Standard.
IsImageVisible
Boolesch
Nein
Beschränkt auf einen der folgenden Werte (0 und 1 sind ungültig):

(true)
Standard.
(false)
IsLabelVisible
Boolesch
Nein
Beschränkt auf einen der folgenden Werte (0 und 1 sind ungültig):

(true)
Standard.
(false)
IsPopup
Boolesch
Nein
Beschränkt auf einen der folgenden Werte (0 und 1 sind ungültig):

(true)
(false)

Untergeordnete Elemente

Es gibt keine untergeordneten Elemente.

Übergeordnete Elemente

Element
ControlGroup
GroupSizeDefinition
Zeile

Bemerkungen

Optional.

Kann für jedes ControlGroup-, Row- oder SizeDefinition-Element ein oder mehrere Male auftreten.

Beispiele

Im folgenden Codebeispiel wird das grundlegende Markup für eine benutzerdefinierte SizeDefinition-Layoutvorlage mit vier Schaltflächen mit verschiedenen ControlSizeDefinition-Elementen veranschaulicht.

<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>

Elementinformationen

  • Unterstützte Mindestsystem: Windows 7
  • Kann leer sein: Ja

Siehe auch

Anpassen eines Menübands durch Größendefinitionen und Skalierungsrichtlinien