-
Notifications
You must be signed in to change notification settings - Fork 298
Expand file tree
/
Copy pathTaskbarItemInfoExample.xaml
More file actions
53 lines (53 loc) · 1.88 KB
/
TaskbarItemInfoExample.xaml
File metadata and controls
53 lines (53 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<wd:Window
x:Class="WPFDevelopers.Samples.ExampleViews.TaskbarItemInfoExample"
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:local="clr-namespace:WPFDevelopers.Samples"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"
Title="TaskbarItemInfoExample"
Width="363"
Height="211"
d:DesignHeight="450"
d:DesignWidth="800"
Icon="/WPFDevelopers.ico"
Owner="{x:Static local:App.CurrentMainWindow}"
ResizeMode="NoResize"
TitleHeight="40"
WindowStartupLocation="CenterOwner"
WindowStyle="ToolWindow"
mc:Ignorable="d">
<Window.TaskbarItemInfo>
<TaskbarItemInfo />
</Window.TaskbarItemInfo>
<Window.Resources>
<DataTemplate x:Key="TaskbarIcon">
<Border
Width="20"
Height="20"
Background="{StaticResource WD.PrimaryBrush}"
BorderBrush="{StaticResource WD.BackgroundBrush}"
BorderThickness="2">
<TextBlock
VerticalAlignment="Center"
Foreground="White"
Text="{Binding}"
TextAlignment="Center" />
</Border>
</DataTemplate>
</Window.Resources>
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<Button
Click="Button_Click"
Content="增加"
Style="{StaticResource WD.PrimaryButton}"
Tag="add" />
<Button
Margin="10,0"
Click="Button_Click"
Content="移除"
Style="{StaticResource WD.SuccessPrimaryButton}"
Tag="remove" />
</WrapPanel>
</wd:Window>