0

我有一个扩展器,它的标题旋转 -90 度:

<Expander Name="exProduct" Grid.Column="1" ExpandDirection="Left" 
          HorizontalAlignment="Right" VerticalAlignment="Stretch">
    <Expander.Header>
        <TextBlock Text="Add Product" FontSize="18"        
            <TextBlock.LayoutTransform>                
                <RotateTransform Angle="-90"/>             
            </TextBlock.LayoutTransform>
        </TextBlock>
    </Expander.Header>

我怎样才能使用这样的东西,并且标题旋转 -90 度:

<Window.Resources>
<Style x:Key="ExpanderEx" TargetType="Expander">
<Setter Property="Header" Value="Show"/>
<Style.Triggers>
<Trigger Property="IsExpanded" Value="True">
<Setter Property="Header" Value="Hide"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources> 

<Expander Style="{StaticResource ExpanderEx}" >

<StackPanel>
    <Button Width="100" Height="50"/>
</StackPanel>
</Expander>
4

0 回答 0