-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFontShuffleControl.xaml
More file actions
620 lines (577 loc) · 40.7 KB
/
FontShuffleControl.xaml
File metadata and controls
620 lines (577 loc) · 40.7 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
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
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
<UserControl x:Class="FontShuffle.FontShuffleControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:FontShuffle"
Name="this"
Loaded="UserControl_Loaded" Unloaded="UserControl_Unloaded"
Height="550">
<UserControl.Resources>
<SolidColorBrush x:Key="BackgroundBrush" Color="{DynamicResource {x:Static SystemColors.WindowColorKey}}"/>
<SolidColorBrush x:Key="BorderBrush" Color="{DynamicResource {x:Static SystemColors.ActiveBorderColorKey}}"/>
<SolidColorBrush x:Key="ForegroundBrush" Color="{DynamicResource {x:Static SystemColors.WindowTextColorKey}}"/>
<SolidColorBrush x:Key="ControlBackgroundBrush" Color="{DynamicResource {x:Static SystemColors.ControlColorKey}}"/>
<SolidColorBrush x:Key="HighlightBrush" Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}"/>
<Style x:Key="ModernButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="8,4"/>
<Setter Property="MinWidth" Value="70"/>
<Setter Property="MinHeight" Value="24"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="ModernTextBoxStyle" TargetType="TextBox">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="4"/>
</Style>
<Style x:Key="ModernCheckBoxStyle" TargetType="CheckBox">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="ModernComboBoxStyle" TargetType="ComboBox">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="8,4"/>
<Setter Property="MinHeight" Value="24"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid>
<ToggleButton x:Name="ToggleButton"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
ClickMode="Press">
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<Border x:Name="Border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Path Grid.Column="1"
x:Name="Arrow"
Data="M 0 0 L 4 4 L 8 0 Z"
Fill="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="4"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<ContentPresenter x:Name="ContentSite"
IsHitTestVisible="False"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
Margin="{TemplateBinding Padding}"
VerticalAlignment="Center"
HorizontalAlignment="Left"/>
<Popup x:Name="Popup"
Placement="Bottom"
IsOpen="{TemplateBinding IsDropDownOpen}"
AllowsTransparency="True"
Focusable="False"
PopupAnimation="Slide">
<Grid MinWidth="{TemplateBinding ActualWidth}" MaxHeight="200">
<Border Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}"
BorderThickness="1"
CornerRadius="2">
<ScrollViewer>
<StackPanel IsItemsHost="True"/>
</ScrollViewer>
</Border>
</Grid>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="ItemContainerStyle">
<Setter.Value>
<Style TargetType="ComboBoxItem">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Padding" Value="8,4"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
</Trigger>
</Style.Triggers>
</Style>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SettingsButtonStyle" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="4"/>
<Setter Property="Width" Value="24"/>
<Setter Property="Height" Value="24"/>
<Setter Property="Cursor" Value="Hand"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"/>
</Trigger>
</Style.Triggers>
</Style>
<local:BoolToColorConverter x:Key="BoolToColorConverter"/>
<local:HasCustomSettingsConverter x:Key="HasCustomSettingsConverter"/>
<local:OrderNumberConverter x:Key="OrderNumberConverter"/>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
</UserControl.Resources>
<Border Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}"
BorderThickness="1"
CornerRadius="4"
Margin="0">
<Grid Margin="8">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Grid.Row="0"
Background="{DynamicResource {x:Static SystemColors.InfoBrushKey}}"
BorderThickness="1"
CornerRadius="3"
Margin="0,0,0,8"
Padding="8">
<Border.Style>
<Style TargetType="Border">
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsUpdateAvailable, ElementName=this}" Value="True">
<Setter Property="BorderBrush" Value="#FF008000"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<Grid>
<StackPanel Visibility="{Binding IsUpToDate, ElementName=this, Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock Text="フォント管理"
FontWeight="Bold"
FontSize="14"
Foreground="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"
Margin="0,0,0,4"/>
<TextBlock Text="シャッフルで使用するフォントを選択・管理できます。検索、フィルター、お気に入り機能、順番の並び替えを活用してください。"
FontSize="11"
Foreground="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"
TextWrapping="Wrap"/>
</StackPanel>
<Grid Visibility="{Binding IsUpdateAvailable, ElementName=this, Converter={StaticResource BooleanToVisibilityConverter}}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Path Grid.Row="0" Grid.Column="0" Grid.RowSpan="2"
Data="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"
Fill="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"
Width="24" Height="24" Margin="0,0,12,0" VerticalAlignment="Center"/>
<TextBlock Grid.Row="0" Grid.Column="1" Text="新しいバージョンがあります" FontWeight="Bold" FontSize="14" Foreground="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"/>
<TextBlock Grid.Row="1" Grid.Column="1" Margin="0,2,0,0" Foreground="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}">
<Run Text="新しいバージョン:"/>
<Run Text="{Binding LatestVersion, ElementName=this, Mode=OneWay}"/>
<Run Text=" (現在のバージョン:"/>
<Run Text="{Binding CurrentVersion, ElementName=this, Mode=OneWay}"/>
<Run Text=")"/>
</TextBlock>
<StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" Margin="0,8,0,0">
<Button Content="ダウンロードページへ" Click="DownloadButton_Click" Style="{StaticResource ModernButtonStyle}"/>
<Button Content="非表示" Click="IgnoreButton_Click" Style="{StaticResource ModernButtonStyle}" Margin="8,0,0,0"/>
</StackPanel>
</Grid>
</Grid>
</Border>
<TabControl Grid.Row="1" Margin="0,0,0,8">
<TabItem Header="フォント選択">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Margin="0,8,0,8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0"
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}"
BorderThickness="1"
CornerRadius="3">
<Grid>
<TextBox x:Name="SearchTextBox"
Style="{StaticResource ModernTextBoxStyle}"
Background="Transparent"
BorderThickness="0"
Padding="8,6"
VerticalContentAlignment="Center"
TextChanged="SearchTextBox_TextChanged"/>
<TextBlock Text="フォント名で検索..."
Foreground="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"
IsHitTestVisible="False"
VerticalAlignment="Center"
Margin="10,0,0,0"
Visibility="{Binding IsSearchEmpty, ElementName=this, Converter={StaticResource BooleanToVisibilityConverter}}"/>
</Grid>
</Border>
<CheckBox Grid.Column="1"
x:Name="ShowSelectedCheckBox"
Content="選択済み"
Style="{StaticResource ModernCheckBoxStyle}"
Margin="8,0,0,0"
VerticalAlignment="Center"
Checked="FilterCheckBox_Changed"
Unchecked="FilterCheckBox_Changed"/>
<CheckBox Grid.Column="2"
x:Name="ShowFavoritesCheckBox"
Content="お気に入り"
Style="{StaticResource ModernCheckBoxStyle}"
Margin="8,0,8,0"
VerticalAlignment="Center"
Checked="FilterCheckBox_Changed"
Unchecked="FilterCheckBox_Changed"/>
<Button Grid.Column="3"
x:Name="FontSettingsButton"
Content="⚙"
Style="{StaticResource SettingsButtonStyle}"
ToolTip="高度な設定"
Click="FontSettingsButton_Click"/>
<Button Grid.Column="4" x:Name="IndexButton"
Click="IndexButton_Click"
Style="{StaticResource SettingsButtonStyle}"
ToolTip="フォントインデックスを再作成"
Margin="4,0,0,0">
<Path Data="M12,4A8,8 0 0,0 4,12H1L4.89,15.89L4.96,16.03L9,12H6A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18C11,18 10.03,17.75 9.2,17.3L7.74,18.76C8.97,19.54 10.43,20 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z"
Fill="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
Width="16" Height="16"/>
</Button>
</Grid>
<Grid Grid.Row="1" Margin="0,0,0,8">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ComboBox Grid.Row="0"
x:Name="FontGroupComboBox"
Style="{StaticResource ModernComboBoxStyle}"
Margin="0,0,0,4"
SelectionChanged="FontGroupComboBox_SelectionChanged"
DisplayMemberPath="Name"/>
<WrapPanel Grid.Row="1" Orientation="Horizontal">
<Button x:Name="SelectAllButton"
Content="全選択"
Click="SelectAllButton_Click"
Style="{StaticResource ModernButtonStyle}"
Margin="0,0,4,0"/>
<Button x:Name="DeselectAllButton"
Content="全解除"
Click="DeselectAllButton_Click"
Style="{StaticResource ModernButtonStyle}"
Margin="0,0,4,0"/>
<Button x:Name="CreateGroupButton"
Content="グループ作成"
Click="CreateGroupButton_Click"
Style="{StaticResource ModernButtonStyle}"
Margin="0,0,4,0"/>
<Button x:Name="ManageGroupsButton"
Content="グループ管理"
Click="ManageGroupsButton_Click"
Style="{StaticResource ModernButtonStyle}"/>
</WrapPanel>
</Grid>
<Border Grid.Row="2"
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}"
BorderThickness="1"
CornerRadius="3">
<Grid>
<ListView x:Name="FontListView"
Background="Transparent"
BorderThickness="0"
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.VirtualizationMode="Recycling"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListView.ItemTemplate>
<DataTemplate>
<Grid Margin="4" MinHeight="28">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<CheckBox Grid.Column="0"
IsChecked="{Binding IsSelected}"
VerticalAlignment="Center"
Style="{StaticResource ModernCheckBoxStyle}"
Margin="0,0,8,0"/>
<Button Grid.Column="1"
Background="Transparent"
BorderThickness="0"
Width="20"
Height="20"
Click="FavoriteButton_Click"
ToolTip="お気に入り切り替え"
Margin="0,0,8,0"
Cursor="Hand"
Padding="0">
<TextBlock Text="★"
FontSize="14"
Foreground="{Binding IsFavorite, Converter={StaticResource BoolToColorConverter}}"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Button>
<TextBlock Grid.Column="2"
Text="{Binding Name}"
VerticalAlignment="Center"
FontFamily="{Binding Name}"
FontSize="12"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
TextTrimming="CharacterEllipsis"
ToolTip="{Binding Name}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<DataTrigger Binding="{Binding IsSelected}" Value="True">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
</DataTrigger>
<DataTrigger Binding="{Binding IsHidden}" Value="True">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
<Setter Property="TextDecorations" Value="Strikethrough"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Grid.Column="3"
Text="●"
FontSize="10"
Foreground="#FF4CAF50"
VerticalAlignment="Center"
Margin="4,0,0,0"
ToolTip="カスタム設定あり"
Visibility="{Binding ., Converter={StaticResource HasCustomSettingsConverter}}"/>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="2"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
</Style.Triggers>
</Style>
</ListView.ItemContainerStyle>
</ListView>
<TextBlock Text="フォントを読み込み中..."
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="14"
Foreground="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"
x:Name="LoadingText"
Visibility="Collapsed"/>
</Grid>
</Border>
</Grid>
</TabItem>
<TabItem Header="順番">
<Grid Margin="0,8,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Text="選択したフォントの順番をドラッグ&ドロップで並び替えることができます。この順番は「順番通り」シャッフルモードで使用されます。"
TextWrapping="Wrap"
Margin="0,0,0,8"/>
<Grid Grid.Row="1" Margin="0,0,0,8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<CheckBox Grid.Column="0"
x:Name="ShowOrderNumbersCheckBox"
Content="順番番号を表示"
Style="{StaticResource ModernCheckBoxStyle}"
Checked="ShowOrderNumbersCheckBox_Changed"
Unchecked="ShowOrderNumbersCheckBox_Changed"
IsChecked="True"/>
<Button Grid.Column="1"
x:Name="OrderSettingsButton"
Content="⚙"
Style="{StaticResource SettingsButtonStyle}"
ToolTip="高度な設定"
Click="FontSettingsButton_Click"/>
</Grid>
<Border Grid.Row="2"
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}"
BorderThickness="1"
CornerRadius="3">
<ListBox x:Name="OrderListBox"
ItemsSource="{Binding OrderedFontNames, ElementName=this}"
AllowDrop="True"
PreviewMouseLeftButtonDown="OrderListBox_PreviewMouseLeftButtonDown"
MouseMove="OrderListBox_MouseMove"
Drop="OrderListBox_Drop"
DragOver="OrderListBox_DragOver"
Background="Transparent"
BorderThickness="0">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0"
Text="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem}, Converter={StaticResource OrderNumberConverter}}"
FontSize="10"
Foreground="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"
VerticalAlignment="Center"
Margin="0,0,8,0"
Visibility="{Binding IsChecked, ElementName=ShowOrderNumbersCheckBox, Converter={StaticResource BooleanToVisibilityConverter}}"/>
<TextBlock Grid.Column="1"
Text="{Binding}"
FontFamily="{Binding}"
FontSize="12"
VerticalAlignment="Center"/>
<TextBlock Grid.Column="2"
Text="●"
FontSize="10"
Foreground="#FF4CAF50"
VerticalAlignment="Center"
Margin="4,0,0,0"
ToolTip="カスタム設定あり"
Visibility="{Binding ., Converter={StaticResource HasCustomSettingsConverter}}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Padding" Value="4,2"/>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Border>
</Grid>
</TabItem>
</TabControl>
<Border Grid.Row="2"
Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}"
BorderThickness="1"
CornerRadius="3"
Padding="8">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center"
x:Name="StatusPanel">
<TextBlock Text="総数: "
FontSize="11"
Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<TextBlock x:Name="TotalCountText"
Text="0"
FontSize="11"
FontWeight="Bold"
Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<TextBlock Text=" | 選択済み: "
FontSize="11"
Margin="10,0,0,0"
Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<TextBlock x:Name="SelectedCountText"
Text="0"
FontSize="11"
FontWeight="Bold"
Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<TextBlock Text=" | お気に入り: "
FontSize="11"
Margin="10,0,0,0"
Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<TextBlock x:Name="FavoriteCountText"
Text="0"
FontSize="11"
FontWeight="Bold"
Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
</StackPanel>
<ProgressBar Grid.Column="1"
x:Name="IndexProgressBar"
Height="20"
Visibility="Collapsed"
Foreground="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"
Background="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"/>
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
<Path Data="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"
Fill="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
Width="16" Height="16" VerticalAlignment="Center"
ToolTip="新しいバージョンが利用可能です" Cursor="Hand"
Visibility="{Binding NewUpdateAfterIgnore, ElementName=this, Converter={StaticResource BooleanToVisibilityConverter}}"
MouseLeftButtonDown="DownloadIcon_MouseLeftButtonDown"
Margin="0,0,4,0"/>
</StackPanel>
</Grid>
</Border>
</Grid>
</Border>
</UserControl>