Menü Schließen

Showing a ComboBox with Different Line Types

This can be used to choose the line type from a ComboBox, for example in a drawing application.

The first entry is a solid line, the second is a dashed line and the last entry displays a dotted line.

<ComboBox Width="80" SelectedIndex="0">
  <ComboBoxItem Height="23">
    <Line X1="0" X2="60" Y1="11" Y2="11" Stroke="Black" StrokeThickness="2" />
  </ComboBoxItem>
  <ComboBoxItem Height="23">
    <Line X1="0" X2="60" Y1="11" Y2="11" Stroke="Black" StrokeThickness="2" StrokeDashArray="2,2" />
  </ComboBoxItem>
  <ComboBoxItem Height="23">
    <Line X1="0" X2="60" Y1="11" Y2="11" Stroke="Black" StrokeThickness="2" StrokeDashArray="2,4" />
  </ComboBoxItem>
</ComboBox>

 

Ähnliche Beiträge

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert