-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.xaml
58 lines (45 loc) · 2.25 KB
/
App.xaml
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
54
55
56
57
58
<Application x:Class="RomSync.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:RomSync"
xmlns:system="clr-namespace:System;assembly=mscorlib"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/ToastNotifications.Messages;component/Themes/Default.xaml" />
</ResourceDictionary.MergedDictionaries>
<BitmapImage x:Key="SyncWaitingImage"
UriSource="pack://application:,,,/Resources/waiting.png" />
<BitmapImage x:Key="SyncCompleteImage"
UriSource="pack://application:,,,/Resources/greencheck.png" />
<DataTemplate x:Key="RomItemTemplate">
<StackPanel Orientation="Horizontal">
<Image Name="SyncImage"
Height="20"
Width="20"
Margin="0,0,10,0" />
<Image Height="20"
Width="20"
Margin="0,0,10,0"
Source="{Binding Icon}" />
<Label Content="{Binding FileInfo.Name}" />
</StackPanel>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding SyncStatus}"
Value="0">
<Setter TargetName="SyncImage"
Property="Source"
Value="{StaticResource SyncWaitingImage}" />
</DataTrigger>
<DataTrigger Binding="{Binding SyncStatus}"
Value="1">
<Setter TargetName="SyncImage"
Property="Source"
Value="{StaticResource SyncCompleteImage}" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</ResourceDictionary>
</Application.Resources>
</Application>