|  | 
| 424 | 424 |     <!-- Expander --> | 
| 425 | 425 | 
 | 
| 426 | 426 |     <!--  | 
| 427 |  | -         A toggle button that displays a triangle expander icon for use in an Expander. | 
| 428 |  | -         Note that when the button is disabled, the triangle expander is hidden.  This is because | 
| 429 |  | -         this is the behavior we want in the only place where we use disabled expanders currently  | 
| 430 |  | -         (PullRequestUserReviewsView). | 
|  | 427 | +         A toggle button that displays a triangle expander for use in an Expander. Note that when  | 
|  | 428 | +         the button is disabled, the triangle expander is hidden.  This is because this is the | 
|  | 429 | +         behavior we want in the only place where we use disabled expanders currently (in  | 
|  | 430 | +         PullRequestUserReviewsView). | 
| 431 | 431 |     --> | 
| 432 | 432 |     <Style x:Key="TriangleToggleButton" TargetType="{x:Type ToggleButton}"> | 
| 433 | 433 |         <Setter Property="Template"> | 
|  | 
| 436 | 436 |                     <Border Background="{TemplateBinding Background}" | 
| 437 | 437 |                             Padding="{TemplateBinding Padding}"> | 
| 438 | 438 |                         <DockPanel> | 
| 439 |  | -                            <ui:OcticonImage x:Name="arrow" | 
| 440 |  | -                                DockPanel.Dock="Left" | 
| 441 |  | -                                Height="10" | 
| 442 |  | -                                Margin="5,0,0,0" | 
| 443 |  | -                                Icon="triangle_right" | 
| 444 |  | -                                Foreground="{TemplateBinding Foreground}" | 
| 445 |  | -                                Visibility="{TemplateBinding IsEnabled, Converter={ui:BooleanToHiddenVisibilityConverter}}"/> | 
|  | 439 | +                            <Border Background="Transparent" Width="10" Margin="5,0"> | 
|  | 440 | +                                <Path Name="arrow" | 
|  | 441 | +                                      DockPanel.Dock="Left" | 
|  | 442 | +                                      Fill="{TemplateBinding Foreground}" | 
|  | 443 | +                                      Height="7" | 
|  | 444 | +                                      Width="7" | 
|  | 445 | +                                      VerticalAlignment="Center" | 
|  | 446 | +                                      HorizontalAlignment="Center" | 
|  | 447 | +                                      Stretch="UniformToFill" | 
|  | 448 | +                                      Data="M7 1l-.025 5H2z" | 
|  | 449 | +                                      Visibility="{TemplateBinding IsEnabled, Converter={ui:BooleanToHiddenVisibilityConverter}}"/> | 
|  | 450 | +                            </Border> | 
| 446 | 451 |                             <ContentPresenter Margin="0" | 
| 447 | 452 |                                 HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" | 
| 448 | 453 |                                 VerticalAlignment="{TemplateBinding VerticalContentAlignment}" | 
|  | 
| 452 | 457 |                     </Border> | 
| 453 | 458 | 
 | 
| 454 | 459 |                     <ControlTemplate.Triggers> | 
| 455 |  | -                        <Trigger Property="IsChecked" Value="True"> | 
| 456 |  | -                            <Setter TargetName="arrow" Property="Icon" Value="triangle_down" /> | 
|  | 460 | +                        <Trigger Property="IsChecked" Value="False"> | 
|  | 461 | +                            <Setter TargetName="arrow" Property="LayoutTransform"> | 
|  | 462 | +                                <Setter.Value> | 
|  | 463 | +                                    <RotateTransform Angle="-45" /> | 
|  | 464 | +                                </Setter.Value> | 
|  | 465 | +                            </Setter> | 
| 457 | 466 |                         </Trigger> | 
| 458 | 467 |                     </ControlTemplate.Triggers> | 
| 459 | 468 |                 </ControlTemplate> | 
|  | 
0 commit comments