|
36 | 36 | </UserControl.Resources> |
37 | 37 |
|
38 | 38 | <StackPanel Orientation="Horizontal"> |
39 | | - <Button |
| 39 | + <Grid> |
| 40 | + <Button |
40 | 41 | Foreground="{DynamicResource VsBrush.StatusBarText}" |
41 | 42 | BorderThickness="0" |
42 | 43 | Padding="4 0" |
43 | 44 | Command="{Binding OpenPullRequestsCommand}"> |
44 | 45 |
|
45 | | - <ui:OcticonPath ToolTip="Open or Create Pull Requests" |
46 | | - Fill="White" |
47 | | - VerticalAlignment="Bottom" |
48 | | - Margin="0 0 0 0" |
49 | | - Icon="git_pull_request" /> |
50 | | - </Button> |
51 | | - <Button |
52 | | - Foreground="{DynamicResource VsBrush.StatusBarText}" |
53 | | - BorderThickness="0" |
54 | | - Padding="4 0" |
55 | | - Command="{Binding ShowCurrentPullRequestCommand}" |
56 | | - Visibility="{Binding Number, TargetNullValue=Collapsed}"> |
| 46 | + <StackPanel Orientation="Horizontal"> |
| 47 | + <ui:OcticonPath |
| 48 | + Fill="White" |
| 49 | + VerticalAlignment="Bottom" |
| 50 | + Margin="0 0 4 0 " |
| 51 | + Icon="git_pull_request" /> |
| 52 | + <TextBlock VerticalAlignment="Center"> |
| 53 | + Pull requests |
| 54 | + </TextBlock> |
| 55 | + </StackPanel> |
| 56 | + </Button> |
| 57 | + <Grid.Style> |
| 58 | + <Style> |
| 59 | + <Setter Property="Control.Visibility" Value="Collapsed" /> |
| 60 | + <Style.Triggers> |
| 61 | + <!-- Visible when Number is Null --> |
| 62 | + <DataTrigger Binding="{Binding Number}" Value="{x:Null}"> |
| 63 | + <Setter Property="Control.Visibility" Value="Visible" /> |
| 64 | + </DataTrigger> |
| 65 | + </Style.Triggers> |
| 66 | + </Style> |
| 67 | + </Grid.Style> |
| 68 | + <Grid.ToolTip> |
| 69 | + <TextBlock VerticalAlignment="Center"> |
| 70 | + Open or Create a Pull request |
| 71 | + </TextBlock> |
| 72 | + </Grid.ToolTip> |
| 73 | + </Grid> |
| 74 | + |
| 75 | + <Grid Visibility="{Binding Number, TargetNullValue=Collapsed}"> |
| 76 | + <Button |
| 77 | + Foreground="{DynamicResource VsBrush.StatusBarText}" |
| 78 | + BorderThickness="0" |
| 79 | + Padding="4 0" |
| 80 | + Command="{Binding ShowCurrentPullRequestCommand}"> |
57 | 81 |
|
58 | | - <TextBlock |
59 | | - VerticalAlignment="Center"> |
60 | | - #<Run Text="{Binding Number}" /> |
61 | | - </TextBlock> |
62 | | - <Button.ToolTip> |
| 82 | + <StackPanel Orientation="Horizontal"> |
| 83 | + <ui:OcticonPath |
| 84 | + Fill="White" |
| 85 | + VerticalAlignment="Bottom" |
| 86 | + Margin="0 0 4 0 " |
| 87 | + Icon="git_pull_request" /> |
| 88 | + <TextBlock VerticalAlignment="Center"> |
| 89 | + #<Run Text="{Binding Number}" /> |
| 90 | + </TextBlock> |
| 91 | + </StackPanel> |
| 92 | + </Button> |
| 93 | + <Grid.ToolTip> |
63 | 94 | <TextBlock VerticalAlignment="Center"> |
64 | 95 | #<Run Text="{Binding Number}" /> - <Run Text="{Binding Title}" /> |
65 | 96 | </TextBlock> |
66 | | - </Button.ToolTip> |
67 | | - </Button> |
| 97 | + </Grid.ToolTip> |
| 98 | + </Grid> |
68 | 99 | </StackPanel> |
69 | 100 | </UserControl> |
0 commit comments