forked from BeyondDimension/SteamTools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
203 lines (189 loc) · 9.28 KB
/
Copy pathMainWindow.xaml
File metadata and controls
203 lines (189 loc) · 9.28 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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<metro:MetroWindow x:Class="SteamTools.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:livet="http://schemas.livet-mvvm.net/2011/wpf"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mtti="http://schemes.grabacr.net/winfx/2015/personal/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:metro="http://schemes.grabacr.net/winfx/2014/controls"
xmlns:pages="clr-namespace:SteamTools.Views.Pages"
xmlns:controls="clr-namespace:SteamTools.Views.Controls"
xmlns:vm="clr-namespace:SteamTools.ViewModels"
xmlns:services="clr-namespace:SteamTools.Services"
mc:Ignorable="d"
Width="840"
Height="600"
Title="{Binding Title}"
Topmost="{Binding Topmost}"
Background="{DynamicResource ThemeBrushKey}"
Foreground="{DynamicResource ActiveForegroundBrushKey}"
FontFamily="{StaticResource DefaultFontFamilyKey}"
UseLayoutRounding="True"
SnapsToDevicePixels="True"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="Auto"
WindowStartupLocation="CenterScreen"
IsRestoringWindowPlacement="True"
d:DataContext="{d:DesignInstance vm:MainWindowViewModel}"
Icon="pack://application:,,,/Resources/Asstes/app.ico">
<i:Interaction.Behaviors>
<livet:WindowCloseCancelBehavior CloseCanceledCallbackMethodTarget="{Binding}"
CloseCanceledCallbackMethodName="CloseCanceledCallback"
CanClose="{Binding CanClose}" />
</i:Interaction.Behaviors>
<i:Interaction.Triggers>
<i:EventTrigger EventName="ContentRendered">
<livet:LivetCallMethodAction MethodTarget="{Binding}"
MethodName="Initialize" />
</i:EventTrigger>
<i:EventTrigger EventName="Closed">
<livet:DataContextDisposeAction />
</i:EventTrigger>
<livet:InteractionMessageTrigger Messenger="{Binding Messenger}"
MessageKey="Window.WindowAction">
<livet:WindowInteractionMessageAction InvokeActionOnlyWhenWindowIsActive="False" />
</livet:InteractionMessageTrigger>
<livet:InteractionMessageTrigger Messenger="{Binding Messenger}"
MessageKey="Window.Transition">
<livet:TransitionInteractionMessageAction InvokeActionOnlyWhenWindowIsActive="False"
IsOwned="False" />
</livet:InteractionMessageTrigger>
<livet:InteractionMessageTrigger Messenger="{Binding Messenger}"
MessageKey="Window.Transition.Child">
<livet:TransitionInteractionMessageAction InvokeActionOnlyWhenWindowIsActive="False"
IsOwned="True" />
</livet:InteractionMessageTrigger>
<livet:InteractionMessageTrigger Messenger="{Binding Messenger}"
MessageKey="Window.UpdateTaskbar">
<mtti:TaskbarMessageAction InvokeActionOnlyWhenWindowIsActive="False" />
</livet:InteractionMessageTrigger>
</i:Interaction.Triggers>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="23" />
</Grid.RowDefinitions>
<!--Title-->
<Border Grid.Row="0"
metro:MetroWindow.IsCaptionBar="True" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<metro:CaptionIcon Grid.Column="0" Padding="6,3">
<Image Source="pack://application:,,,/Resources/Asstes/app.ico" Width="32" Height="32"></Image>
</metro:CaptionIcon>
<TextBlock Grid.Column="1"
Grid.Row="0"
Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=Title}"
TextTrimming="CharacterEllipsis"
Foreground="{DynamicResource ForegroundBrushKey}"
FontSize="16"
VerticalAlignment="Center" />
<metro:SystemButtons Grid.Column="2"
Grid.Row="0"
VerticalAlignment="Top" />
</Grid>
</Border>
<!--Body-->
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ScrollViewer VerticalScrollBarVisibility="Auto" PanningMode="Both" >
<Grid MinWidth="90" Background="{DynamicResource ActiveBackgroundBrushKey}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<metro:TabView ItemsSource="{Binding TabItems}"
SelectedValue="{Binding SelectedItem}" />
<Rectangle Grid.Row="1"
Height=".99"
Margin="20,10"
Fill="{DynamicResource InactiveForegroundBrushKey}"
Opacity="0.5" />
<metro:TabView Grid.Row="2"
ItemsSource="{Binding SystemTabItems}"
SelectedValue="{Binding SelectedItem}"
Margin="0,0,0,20" />
</Grid>
</ScrollViewer>
<Grid Grid.Column="1">
<ItemsControl ItemsSource="{Binding TabItems}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Grid />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type vm:TabItemViewModel}">
<ContentControl Content="{Binding}"
Visibility="{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ItemsControl ItemsSource="{Binding SystemTabItems}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Grid />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type vm:TabItemViewModel}">
<ContentControl Content="{Binding}"
Visibility="{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Grid.Resources>
<DataTemplate DataType="{x:Type vm:WelcomePageViewModel}">
<pages:WelcomePage />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:AboutPageViewModel}">
<pages:AboutPage />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:SettingsPageViewModel}">
<pages:SettingsPage />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:SteamAppPageViewModel}">
<pages:SteamAppPage />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:LocalAuthPageViewModel}">
<pages:LocalAuthPage />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:SteamAccountPageViewModel}">
<pages:SwitchSteamAccountPage />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:SteamIdlePageViewModel}">
<pages:SteamIdleCardPage />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:CommunityProxyPageViewModel}">
<pages:CommunityProxyPage />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:OtherPlatformPageViewModel}">
<pages:OtherPlatformPage />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:GameRelatedPageViewModel}">
<pages:GameRelatedPage />
</DataTemplate>
<DataTemplate DataType="{x:Type vm:DebugPageViewModel}">
<pages:DebugPage />
</DataTemplate>
</Grid.Resources>
</Grid>
</Grid>
<!--Footer-->
<controls:StatusBar Grid.Row="2" DataContext="{Binding StatusBar}">
</controls:StatusBar>
</Grid>
</metro:MetroWindow>