代码如下:
<ComboBox Name="combox2" Width="120" Margin="5 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Left" Background="White" SelectedIndex="0" Height="20">
<ComboBoxItem Margin="0 5 0 5">
<StackPanel Orientation="Horizontal">
<Line X1="5" X2="110" Width="84" Margin="10 5 5 5" StrokeThickness="3" Stroke="Black" VerticalAlignment="Center" HorizontalAlignment="Left"></Line>
</StackPanel>
</ComboBoxItem>
<ComboBoxItem Margin="0 5 0 5">
<StackPanel Orientation="Horizontal">
<Line X1="5" X2="110" Width="80" Margin="10 5 5 5" StrokeThickness="3" Stroke="Black" VerticalAlignment="Center" HorizontalAlignment="Left"></Line>
<Path
Fill="{StaticResource GlyphBrush}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M0,10 L5,0 10,10 z"
>
<Path.RenderTransform>
<TransformGroup>
<RotateTransform Angle="90"/>
</TransformGroup>
</Path.RenderTransform>
</Path>
</StackPanel>
</ComboBoxItem>
<ComboBoxItem Margin="0 5 0 5">
<StackPanel Orientation="Horizontal">
<Path Margin="15,0,-10,0"
Fill="{StaticResource GlyphBrush}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M0,10 L5,0 10,10 z"
RenderTransformOrigin="0.5,0.5"
>
<Path.RenderTransform>
<TransformGroup>
<RotateTransform Angle="-90"/>
</TransformGroup>
</Path.RenderTransform>
</Path>
<Line X1="5" X2="110" Width="80" Margin="0 5 3 5" StrokeThickness="3" Stroke="Black" VerticalAlignment="Center" HorizontalAlignment="Left"></Line>
</StackPanel>
</ComboBoxItem>
<ComboBoxItem Margin="0 5 0 5">
<StackPanel Orientation="Horizontal">
<Path Margin="15,0,-10,0"
Fill="{StaticResource GlyphBrush}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M0,10 L5,0 10,10 z"
RenderTransformOrigin="0.5,0.5"
>
<Path.RenderTransform>
<TransformGroup>
<RotateTransform Angle="-90"/>
</TransformGroup>
</Path.RenderTransform>
</Path>
<Line X1="5" X2="110" Width="80" Margin="0 5 3 5" StrokeThickness="3" Stroke="Black" VerticalAlignment="Center" HorizontalAlignment="Left"></Line>
<Path
Fill="{StaticResource GlyphBrush}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M0,10 L5,0 10,10 z"
>
<Path.RenderTransform>
<TransformGroup>
<RotateTransform Angle="90"/>
</TransformGroup>
</Path.RenderTransform>
</Path>
</StackPanel>
</ComboBoxItem>
</ComboBox>