BililiveRecorder/BililiveRecorder.WPF/Controls/TaskbarIconControl.xaml

38 lines
1.9 KiB
Plaintext
Raw Normal View History

2020-11-28 13:02:57 +08:00
<UserControl
x:Class="BililiveRecorder.WPF.Controls.TaskbarIconControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:local="clr-namespace:BililiveRecorder.WPF.Controls"
xmlns:wpf="clr-namespace:BililiveRecorder.WPF"
xmlns:page="clr-namespace:BililiveRecorder.WPF.Pages"
xmlns:conv="clr-namespace:BililiveRecorder.WPF.Converters"
mc:Ignorable="d">
<UserControl.Resources>
<conv:IsNullToVisibilityConverter x:Key="IsNullToVisibilityConverter"/>
</UserControl.Resources>
<tb:TaskbarIcon x:Name="TaskbarIcon" IconSource="/ico.ico" TrayLeftMouseUp="TaskbarIcon_TrayLeftMouseUp"
Visibility="{Binding Recorder, Converter={StaticResource IsNullToVisibilityConverter}}"
ToolTipText="B站录播姬" PopupActivation="RightClick"
>
<tb:TaskbarIcon.TrayToolTip>
<Border
Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
BorderBrush="{DynamicResource SystemControlBackgroundAccentBrush}"
2020-12-01 08:35:10 +08:00
BorderThickness="2"
2020-11-28 13:02:57 +08:00
CornerRadius="5">
<StackPanel Margin="10">
<TextBlock Style="{DynamicResource SubtitleTextBlockStyle}" Text="B站录播姬"/>
<TextBlock Text="{Binding Recorder.Config.WorkDirectory,Mode=OneWay}"/>
</StackPanel>
</Border>
</tb:TaskbarIcon.TrayToolTip>
<tb:TaskbarIcon.TrayPopup>
<local:TaskbarIconTrayPopup/>
</tb:TaskbarIcon.TrayPopup>
</tb:TaskbarIcon>
</UserControl>