|
69 | 69 | </Setter.Value> |
70 | 70 | </Setter> |
71 | 71 | </Style> |
| 72 | + |
| 73 | + <Style x:Key="TitleBarStatusDot" TargetType="Ellipse"> |
| 74 | + <Setter Property="Width" Value="8" /> |
| 75 | + <Setter Property="Height" Value="8" /> |
| 76 | + <Setter Property="Fill" Value="{DynamicResource ChromeSubtleForeground}" /> |
| 77 | + <Style.Triggers> |
| 78 | + <DataTrigger Binding="{Binding StatusTone, RelativeSource={RelativeSource AncestorType=UserControl}}" Value="ready"> |
| 79 | + <Setter Property="Fill" Value="{DynamicResource StatusOk}" /> |
| 80 | + </DataTrigger> |
| 81 | + <DataTrigger Binding="{Binding StatusTone, RelativeSource={RelativeSource AncestorType=UserControl}}" Value="connected"> |
| 82 | + <Setter Property="Fill" Value="{DynamicResource StatusOk}" /> |
| 83 | + </DataTrigger> |
| 84 | + <DataTrigger Binding="{Binding StatusTone, RelativeSource={RelativeSource AncestorType=UserControl}}" Value="waiting"> |
| 85 | + <Setter Property="Fill" Value="{DynamicResource StatusWarn}" /> |
| 86 | + </DataTrigger> |
| 87 | + <DataTrigger Binding="{Binding StatusTone, RelativeSource={RelativeSource AncestorType=UserControl}}" Value="error"> |
| 88 | + <Setter Property="Fill" Value="{DynamicResource StatusError}" /> |
| 89 | + </DataTrigger> |
| 90 | + </Style.Triggers> |
| 91 | + </Style> |
72 | 92 | </UserControl.Resources> |
73 | 93 |
|
74 | 94 | <Grid> |
75 | 95 | <Grid.ColumnDefinitions> |
76 | 96 | <ColumnDefinition Width="*" /> |
77 | 97 | <ColumnDefinition Width="Auto" /> |
| 98 | + <ColumnDefinition Width="Auto" /> |
78 | 99 | </Grid.ColumnDefinitions> |
79 | 100 |
|
80 | 101 | <StackPanel Margin="14,0,10,0" |
|
93 | 114 | Foreground="{DynamicResource ChromeForeground}" /> |
94 | 115 | </StackPanel> |
95 | 116 |
|
96 | | - <StackPanel Grid.Column="1" |
| 117 | + <Border x:Name="TitleBarStatusBadge" |
| 118 | + Grid.Column="1" |
| 119 | + Height="28" |
| 120 | + MaxWidth="220" |
| 121 | + Margin="8,0,8,0" |
| 122 | + Padding="10,0" |
| 123 | + VerticalAlignment="Center" |
| 124 | + Background="#22FFFFFF" |
| 125 | + BorderBrush="{DynamicResource ChromeSubtleForeground}" |
| 126 | + BorderThickness="1" |
| 127 | + CornerRadius="14" |
| 128 | + AutomationProperties.AutomationId="TitleBarStatusBadge" |
| 129 | + AutomationProperties.Name="{Binding StatusText, RelativeSource={RelativeSource AncestorType=UserControl}}" |
| 130 | + Visibility="{Binding ShowStatusBadge, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={StaticResource BooleanToVisibilityConverter}}"> |
| 131 | + <Grid VerticalAlignment="Center"> |
| 132 | + <Grid.ColumnDefinitions> |
| 133 | + <ColumnDefinition Width="Auto" /> |
| 134 | + <ColumnDefinition Width="*" /> |
| 135 | + </Grid.ColumnDefinitions> |
| 136 | + <Ellipse x:Name="TitleBarStatusDot" |
| 137 | + VerticalAlignment="Center" |
| 138 | + Style="{StaticResource TitleBarStatusDot}" /> |
| 139 | + <TextBlock Grid.Column="1" |
| 140 | + Margin="8,0,0,0" |
| 141 | + VerticalAlignment="Center" |
| 142 | + Text="{Binding StatusText, RelativeSource={RelativeSource AncestorType=UserControl}}" |
| 143 | + TextTrimming="CharacterEllipsis" |
| 144 | + Foreground="{DynamicResource ChromeForeground}" |
| 145 | + FontSize="12" |
| 146 | + FontWeight="SemiBold" /> |
| 147 | + </Grid> |
| 148 | + </Border> |
| 149 | + |
| 150 | + <StackPanel Grid.Column="2" |
97 | 151 | Orientation="Horizontal"> |
98 | 152 | <Button x:Name="MinimizeButton" |
99 | 153 | Content="-" |
|
0 commit comments