Skip to content

Commit

Permalink
Added application name to tray menu
Browse files Browse the repository at this point in the history
  • Loading branch information
TTLC198 committed Dec 7, 2023
1 parent 33ee9b9 commit e3d5c0b
Showing 1 changed file with 47 additions and 4 deletions.
51 changes: 47 additions & 4 deletions HSMonitor/Views/MainWindowView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,26 +70,69 @@
</tb:TaskbarIcon.Style>
<tb:TaskbarIcon.ContextMenu>
<ContextMenu
Background="{DynamicResource PrimaryHueLightBrush}"
Margin="2">
Background="{DynamicResource PrimaryHueLightBrush}">
<MenuItem
IsEnabled="False"
Click="Show_OnClick">
<MenuItem.Header>
<TextBlock
FontSize="14"
Margin="0"
Foreground="{StaticResource PrimaryHueLightForegroundBrush}"
Text="HSMonitor"/>
</MenuItem.Header>
<MenuItem.Icon>
<!-- Application Logo -->
<Image
VerticalAlignment="Center">
<Image.Style>
<Style
TargetType="{x:Type Image}">
<Setter
Property="Source"
Value="../Resources/Images/favicon_wrong_light.ico"/>
<Style.Triggers>
<DataTrigger
Binding="{Binding IsSerialMonitorEnabled}" Value="True">
<Setter
Property="Source"
Value="../Resources/Images/favicon_light.ico"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</MenuItem.Icon>
</MenuItem>
<Separator/>
<MenuItem
Click="Show_OnClick">
<MenuItem.Header>
<TextBlock
FontSize="14"
Margin="0"
Foreground="{StaticResource PrimaryHueLightForegroundBrush}"
Text="{x:Static p:Resources.ShowWindowFromTrayButtonText}"/>
</MenuItem.Header>
<MenuItem.Icon>
<materialDesign:PackIcon Kind="WindowMaximize" />
<materialDesign:PackIcon
Foreground="{StaticResource PrimaryHueLightForegroundBrush}"
Kind="WindowMaximize" />
</MenuItem.Icon>
</MenuItem>
<MenuItem
Click="Close_OnClick">
<MenuItem.Header>
<TextBlock
FontSize="14"
Margin="0"
Foreground="{StaticResource PrimaryHueLightForegroundBrush}"
Text="{x:Static p:Resources.CloseAppFromTrayButtonText}"/>
</MenuItem.Header>
<MenuItem.Icon>
<materialDesign:PackIcon Kind="WindowClose" />
<materialDesign:PackIcon
Foreground="{StaticResource PrimaryHueLightForegroundBrush}"
Kind="WindowClose" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
Expand Down

0 comments on commit e3d5c0b

Please sign in to comment.