-
Notifications
You must be signed in to change notification settings - Fork 4
/
MainWindowResources.xaml
111 lines (102 loc) · 4.14 KB
/
MainWindowResources.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!--
This resource dictionary is used by the MainWindow.
-->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:com="clr-namespace:DotNetNuke.Translator.Common"
xmlns:vm="clr-namespace:DotNetNuke.Translator.ViewModel"
xmlns:vw="clr-namespace:DotNetNuke.Translator.View"
xmlns:proj="clr-namespace:DotNetNuke.Translator"
>
<com:BoolToVisibilityConverter x:Key="boolConverter" />
<DataTemplate DataType="{x:Type vm:ResourceFileViewModel}">
<vw:ResourceFileView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:ResourceCollectionViewModel}">
<vw:ResourceFileView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:SearchViewModel}">
<vw:ResourceFileView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:LEMergeViewModel}">
<vw:LEMergeView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:ResourceVerifierViewModel}">
<vw:ResourceVerifierView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:SnapshotComparisonViewModel}">
<vw:SnapshotComparisonView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
</DataTemplate>
<ControlTemplate x:Key="ComponentListing" TargetType="ComboBoxItem">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding FriendlyName}" TextAlignment="Left" TextWrapping="Wrap" Width="100" />
</StackPanel>
</ControlTemplate>
<!--
This style ensures that the borders in the main window are consistent.
-->
<Style x:Key="MainBorderStyle" TargetType="{x:Type Border}">
<Setter Property="Background" Value="WhiteSmoke" />
<Setter Property="BorderBrush" Value="LightGray" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="5" />
<Setter Property="SnapsToDevicePixels" Value="True" />
</Style>
<Style TargetType="TextBlock" x:Key="StatusBarTextBlock">
<Setter Property="TextWrapping" Value="NoWrap" />
<Setter Property="TextTrimming" Value="CharacterEllipsis" />
</Style>
<!--
This template explains how to render
a tab item with a close button.
-->
<DataTemplate x:Key="ClosableTabItemTemplate">
<DockPanel Width="120" DockPanel.Dock="Top">
<Button
Command="{Binding Path=CloseCommand}"
Content="X"
Cursor="Hand"
DockPanel.Dock="Right"
Focusable="False"
FontFamily="Courier"
FontSize="9"
FontWeight="Bold"
Margin="0,1,0,0"
Padding="0"
VerticalContentAlignment="Bottom"
Width="16" Height="16"
/>
<ContentPresenter
Content="{Binding Path=DisplayName}"
VerticalAlignment="Center"
/>
</DockPanel>
</DataTemplate>
<!--
This template explains how to render the 'Workspace' content area in the main window.
-->
<DataTemplate x:Key="WorkspacesTemplate">
<TabControl
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding}"
ItemTemplate="{StaticResource ClosableTabItemTemplate}"
ContentTemplate="{DynamicResource ContentTemplate}"
SelectedIndex="{Binding DataContext.SelectedTabIndex, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
Margin="4"
>
</TabControl>
</DataTemplate>
<Style x:Key="TreenodeButtonStyle" TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<StackPanel Orientation="Horizontal">
<Image Name="img" Width="20" Height="20" Stretch="None" Source="{Binding Image}"/>
<TextBlock Text="{Binding Name}" Margin="5,0" />
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>