1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-25 15:20:10 +00:00
msfs-popout-panel-manager/MainApp/UserControl/TrayIcon.xaml
2023-07-12 18:47:24 -04:00

53 lines
2.6 KiB
XML

<UserControl
x:Class="MSFSPopoutPanelManager.MainApp.TrayIcon"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:tb="http://www.hardcodet.net/taskbar"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<UserControl.Resources>
<Style TargetType="MenuItem">
<Setter Property="FontSize" Value="14" />
</Style>
</UserControl.Resources>
<tb:TaskbarIcon
x:Name="Tray"
IconSource="../logo.ico"
MenuActivation="RightClick"
Visibility="Visible">
<tb:TaskbarIcon.ContextMenu>
<ContextMenu>
<MenuItem
x:Name="MenuItemProfiles"
Click="MenuItem_Click"
Header="Profiles"
ItemsSource="{Binding ProfileData.Profiles}"
Style="{StaticResource MaterialDesignMenuItem}">
<MenuItem.ItemContainerStyle>
<Style BasedOn="{StaticResource MaterialDesignMenuItem}" TargetType="MenuItem">
<Setter Property="MenuItem.Header" Value="{Binding Name}" />
<Setter Property="MenuItem.IsCheckable" Value="True" />
<Setter Property="MenuItem.IsChecked" Value="{Binding IsActive}" />
<Setter Property="MenuItem.Command" Value="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=DataContext.ChangeProfileCommand}" />
<Setter Property="MenuItem.CommandParameter" Value="{Binding Id}" />
<Setter Property="MenuItem.FlowDirection" Value="LeftToRight" />
<Setter Property="Margin" Value="0" />
</Style>
</MenuItem.ItemContainerStyle>
</MenuItem>
<MenuItem
Command="{Binding StartPopOutCommand}"
Header="Start Pop Out"
Style="{StaticResource MaterialDesignMenuItem}" />
<Separator />
<MenuItem
Command="{Binding ExitAppCommand}"
Header="Exit"
Style="{StaticResource MaterialDesignMenuItem}" />
</ContextMenu>
</tb:TaskbarIcon.ContextMenu>
</tb:TaskbarIcon>
</UserControl>