-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContextPane.xaml
347 lines (340 loc) · 15.4 KB
/
ContextPane.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
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
<src:ItemContextPane
x:Class="Plugin_Everything.ContextPane"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:src="clr-namespace:Quokka.ListItems;assembly=Quokka"
Title="ContextPane"
d:DesignHeight="300"
d:DesignWidth="800"
KeyDown="Page_KeyDown"
UseLayoutRounding="True"
mc:Ignorable="d">
<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Quokka;component/SearchWindow/ScrollBar.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Page.Resources>
<Border
Width="auto"
Height="auto"
MinHeight="{DynamicResource ContextPaneMinHeight}"
d:Background="#f3f3f3"
d:BorderBrush="#e5e5e5"
d:BorderThickness="1"
d:CornerRadius="15"
d:MinHeight="64"
Background="{DynamicResource ContextPaneBgColor}"
BorderBrush="{DynamicResource ContextPaneBorderColor}"
BorderThickness="{DynamicResource ContextPaneBorderThickness}"
CornerRadius="{DynamicResource ContextPaneCornerRounding}">
<Grid
Margin="{DynamicResource ContextPaneContentMargin}"
HorizontalAlignment="Stretch"
VerticalAlignment="{DynamicResource ContextPaneContentVerticalAlignment}"
d:Margin="0,0,0,0"
d:VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*" />
<ColumnDefinition Width="5*" />
</Grid.ColumnDefinitions>
<Grid
Grid.Column="0"
HorizontalAlignment="{DynamicResource ContextPaneContentHorizontalAlignment}"
d:HorizontalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="4*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="3*" />
</Grid.RowDefinitions>
<Image
x:Name="DetailsImage"
Grid.Row="0"
Width="{DynamicResource ContextPaneImageSize}"
Height="{DynamicResource ContextPaneImageSize}"
Margin="{DynamicResource ContextPaneImageMargin}"
d:Height="32"
d:Margin="0,0,0,30"
d:Width="32"
UseLayoutRounding="True" />
<TextBlock
x:Name="NameText"
Grid.Row="1"
MaxWidth="{DynamicResource MaxDetailsWidth}"
Margin="{DynamicResource NameTextMargin}"
d:FontSize="16"
d:Margin="0,-20,0,0"
d:MaxWidth="360"
d:Text="FileName"
FontFamily="{DynamicResource AppFont}"
FontSize="{DynamicResource NameTextSize}"
Foreground="{DynamicResource NameTextColor}"
Text=""
TextWrapping="Wrap"
UseLayoutRounding="True" />
<TextBlock
x:Name="DescText"
Grid.Row="2"
MaxWidth="{DynamicResource MaxDetailsWidth}"
Margin="{DynamicResource DescTextMargin}"
d:FontSize="12"
d:Margin="0"
d:MaxWidth="360"
d:Text="Description Description Description Description"
FontFamily="{DynamicResource AppFont}"
FontSize="{DynamicResource DescTextSize}"
Foreground="{DynamicResource DescTextColor}"
Text=""
TextWrapping="Wrap"
UseLayoutRounding="True" />
<TextBlock
x:Name="ExtraDetails"
Grid.Row="3"
MaxWidth="{DynamicResource MaxDetailsWidth}"
Margin="{DynamicResource ExtraDetailsTextMargin}"
d:FontSize="12"
d:Margin="0"
d:MaxWidth="360"
d:Text="blah blahblah blahblah blahblah blahblah blahblah blahblah blahblah blahblah blah, made in 2023 / 24 / 5 years ago ..."
FontFamily="{DynamicResource AppFont}"
FontSize="{DynamicResource ExtraDetailsTextSize}"
Foreground="{DynamicResource ExtraDetailsTextColor}"
Text=""
TextWrapping="Wrap"
UseLayoutRounding="True" />
</Grid>
<Grid Grid.Column="1" VerticalAlignment="Center">
<ListView
x:Name="ButtonsListView"
Margin="{DynamicResource ContextPaneListMargin}"
HorizontalAlignment="{DynamicResource ContextPaneListHorizontalAlignment}"
HorizontalContentAlignment="{DynamicResource ContextPaneListContentHorizontalAlignment}"
d:HorizontalAlignment="Center"
d:HorizontalContentAlignment="Stretch"
d:Margin="-50,0,0,0"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0"
KeyboardNavigation.DirectionalNavigation="Cycle"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
SelectionMode="Single">
<ListView.Resources>
<Style x:Key="FocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle
Margin="2"
Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
StrokeDashArray="1 2"
StrokeThickness="0"
UseLayoutRounding="True" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type ListViewItem}">
<Style.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="{DynamicResource ContextPaneListItemRounding}" />
<Setter d:Value="0, 0, 10, 0" Property="Margin" Value="{DynamicResource ContextPaneListItemMargin}" />
</Style>
</Style.Resources>
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="{DynamicResource ContextPaneListItemBorderThickness}" />
<Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="Padding" Value="4,1" />
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListViewItem}">
<Border
x:Name="Bd"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
UseLayoutRounding="True">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
UseLayoutRounding="{TemplateBinding UseLayoutRounding}" />
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ContextPaneListItemHoverBgColor}" />
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource ContextPaneListItemHoverBorderColor}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Selector.IsSelectionActive" Value="False" />
<Condition Property="IsSelected" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ContextPaneListItemSelectedBgColor}" />
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource ContextPaneListItemSelectedBorderColor}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Selector.IsSelectionActive" Value="True" />
<Condition Property="IsSelected" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ContextPaneListItemSelectedBgColor}" />
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource ContextPaneListItemSelectedBorderColor}" />
</MultiTrigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListView.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="9*" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Image
Width="{DynamicResource ContextPaneListItemIconSize}"
Height="{DynamicResource ContextPaneListItemIconSize}"
Margin="{DynamicResource ContextPaneListItemIconMargin}"
d:Height="20"
d:Margin="0,0,0,0"
d:Width="20"
Source="pack://siteoforigin:,,,/PlugBoard/Plugin_Everything/Plugin/preview.png"
UseLayoutRounding="True" />
</Grid>
<Grid Grid.Column="1">
<Button
Margin="{DynamicResource ContextPaneListItemContentMargin}"
Padding="{DynamicResource ContextPaneListItemTextPadding}"
d:FontSize="12"
d:Margin="10"
d:Padding="10"
Background="Transparent"
BorderThickness="0"
Click="Preview"
Content="Preview"
FontFamily="{DynamicResource AppFont}"
FontSize="{DynamicResource ContextPaneListItemSize}"
Foreground="{DynamicResource ContextPaneListItemColor}"
Style="{StaticResource TransparentStyle}"
UseLayoutRounding="True" />
</Grid>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="9*" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Image
Width="{DynamicResource ContextPaneListItemIconSize}"
Height="{DynamicResource ContextPaneListItemIconSize}"
Margin="{DynamicResource ContextPaneListItemIconMargin}"
d:Height="20"
d:Margin="0,0,0,0"
d:Width="20"
Source="pack://siteoforigin:,,,/Config/Resources/open.png"
UseLayoutRounding="True" />
</Grid>
<Grid Grid.Column="1">
<Button
Margin="{DynamicResource ContextPaneListItemContentMargin}"
Padding="{DynamicResource ContextPaneListItemTextPadding}"
d:Margin="10"
d:Padding="10"
Background="Transparent"
BorderThickness="0"
Click="OpenWith"
Content="Open With ..."
FontFamily="{DynamicResource AppFont}"
FontSize="{DynamicResource ContextPaneListItemSize}"
Foreground="{DynamicResource ContextPaneListItemColor}"
Style="{StaticResource TransparentStyle}"
UseLayoutRounding="True" />
</Grid>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="9*" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Image
Width="{DynamicResource ContextPaneListItemIconSize}"
Height="{DynamicResource ContextPaneListItemIconSize}"
Margin="{DynamicResource ContextPaneListItemIconMargin}"
d:Height="20"
d:Margin="0,0,0,0"
d:Width="20"
Source="pack://siteoforigin:,,,/Config/Resources/openFolder.png"
UseLayoutRounding="True" />
</Grid>
<Grid Grid.Column="1">
<Button
Margin="{DynamicResource ContextPaneListItemContentMargin}"
Padding="{DynamicResource ContextPaneListItemTextPadding}"
d:Margin="10"
d:Padding="10"
Background="Transparent"
BorderThickness="0"
Click="OpenContainingFolder"
Content="Open containing folder"
FontFamily="{DynamicResource AppFont}"
FontSize="{DynamicResource ContextPaneListItemSize}"
Foreground="{DynamicResource ContextPaneListItemColor}"
Style="{StaticResource TransparentStyle}"
UseLayoutRounding="True" />
</Grid>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="9*" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Image
Width="{DynamicResource ContextPaneListItemIconSize}"
Height="{DynamicResource ContextPaneListItemIconSize}"
Margin="{DynamicResource ContextPaneListItemIconMargin}"
d:Height="20"
d:Margin="0,0,0,0"
d:Width="20"
Source="pack://siteoforigin:,,,/PlugBoard/Plugin_Everything/Plugin/contextMenu.png"
UseLayoutRounding="True" />
</Grid>
<Grid Grid.Column="1">
<Button
Margin="{DynamicResource ContextPaneListItemContentMargin}"
Padding="{DynamicResource ContextPaneListItemTextPadding}"
d:Margin="10"
d:Padding="10"
Background="Transparent"
BorderThickness="0"
Click="OpenContextMenu"
Content="Open context menu"
FontFamily="{DynamicResource AppFont}"
FontSize="{DynamicResource ContextPaneListItemSize}"
Foreground="{DynamicResource ContextPaneListItemColor}"
Style="{StaticResource TransparentStyle}"
UseLayoutRounding="True" />
</Grid>
</Grid>
</ListView>
</Grid>
</Grid>
</Border>
</src:ItemContextPane>