-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
560 lines (514 loc) · 36.3 KB
/
MainWindow.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
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
<Window x:Class="RegFineViewer.MainWindow"
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"
mc:Ignorable="d"
Title="Registry Fine Viewer" Height="640" MaxHeight="920" Width="860" MinWidth="860"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}"
xmlns:local="clr-namespace:RegFineViewer"
Name="Fenetre">
<!-- *************************************************************** -->
<!-- On définit quelques styles généraux -->
<!-- *************************************************************** -->
<Window.Resources>
<!-- Style for chips-->
<Style TargetType="materialDesign:Chip" >
<Setter Property="Margin" Value="16,2,16,2"/>
<Setter Property="IsDeletable" Value="True"/>
</Style>
<!--Style pour les boutons "change unit" -->
<Style TargetType="Button" x:Key="OutlinedSmallButton" BasedOn="{StaticResource MaterialDesignOutlinedButton}" >
<Setter Property="Width" Value="60"/>
<Setter Property="Height" Value="20" />
<Setter Property="Padding" Value="0"/>
<Setter Property="FontSize" Value="12" />
<Setter Property="FontWeight" Value="Light" />
</Style>
<!--<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Green" />
Les couleurs du thème: Accent colors:
PrimaryHueDarkBrush SecondaryHueDarkBrush PrimaryHueDarkForegroundBrush
PrimaryHueMidBrush SecondaryHueMidBrush
PrimaryHueLightBrush SecondaryHueLightBrush
-->
<!--<Style TargetType="TreeViewItem" >
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
<Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
</Style>-->
</Window.Resources>
<DockPanel Name="dockpanel">
<!-- *************************************************************** -->
<!-- Grille -->
<!-- *************************************************************** -->
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" Name="leftColumn" MinWidth="820"/>
<!--<ColumnDefinition Width="5" Name="separatorColumn"/-->
<!--<ColumnDefinition Width="*" Name="rightColumn" MinWidth="420"/-->
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" Name="ToolbarRow" />
<RowDefinition Height="Auto" Name="TitleRow" />
<RowDefinition Height="*" Name="TreeViewRow" />
<RowDefinition Height="Auto" Name="EditionRow" />
<RowDefinition Height="Auto" Name="SearchbarRow" />
</Grid.RowDefinitions>
<!-- ==========================-->
<!-- TOOLBAR -->
<!-- ==========================-->
<ToolBarTray DockPanel.Dock="top" Grid.Column="0" Grid.Row="0">
<ToolBar Style="{DynamicResource MaterialDesignToolBar}" >
<!--Expand Button-->
<Button ToolTip="Expand Level" Click="Bt_Expand_Click" >
<materialDesign:PackIcon Kind="ExpandMore"/>
</Button>
<!--Collapse Button-->
<Button ToolTip="Collapse Tree" Click="Bt_Collapse_Click" >
<materialDesign:PackIcon Kind="ExpandLess"/>
</Button>
<!--Tree Stats Button-->
<Button ToolTip="Tree Infos" Click="Bt_TreeInfos_Click">
<materialDesign:PackIcon Kind="ChartBarStacked" />
</Button>
<!--Open History Button -->
<Button ToolTip="Open Recent" Click="Bt_OpenRecent_Click">
<materialDesign:PackIcon Kind="Recent" />
</Button>
<!--Open Hive Button -->
<Button ToolTip="Import Registry" Click="Bt_SelectHive_Click" >
<materialDesign:PackIcon Kind="OpenInApp" />
</Button>
<!--Buttton de Stats sur la longueur des textes -->
<Button ToolTip="Length stats" Name="Bt_LengthStats" Click="Bt_LengthStats_Click" Visibility="Hidden">
<materialDesign:PackIcon Kind="ChartGantt" />
</Button>
<!--Debug Button-->
<Button ToolTip="Create a Test tree" Click="FillRegistryTree" Visibility="Hidden" >
<materialDesign:PackIcon Kind="TestTube"/>
</Button>
<!--Test Button-->
<Button ToolTip="Test Function" Visibility="Hidden" >
<materialDesign:PackIcon Kind="TestTube"/>
</Button>
</ToolBar>
</ToolBarTray>
<!-- ==========================-->
<!-- CHIP -->
<!-- ==========================-->
<materialDesign:Chip Grid.Column="0" Grid.Row="1" x:Name="Tree_InfoChip" Content="no file loaded" DeleteClick="Bt_CloseFile_Click" DeleteToolTip="Close the file">
<materialDesign:Chip.Icon>
<materialDesign:PackIcon Name="Tree_InfoChipIcon" Kind="QuestionMarkCircle"/>
</materialDesign:Chip.Icon>
</materialDesign:Chip>
<!-- ==========================-->
<!-- DROP ZONE -->
<!-- ==========================-->
<TextBlock x:Name="DropZone" Grid.Column="0" Grid.Row="2" AllowDrop="True" Drop="Tree1_drop" FontSize="48" Foreground="LightGray" TextAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Center" Margin="40,0,40,0" Focusable="False" >
drop your<LineBreak/>registry file<LineBreak/>here
</TextBlock>
<!-- ==========================-->
<!-- TREE VIEW -->
<!-- ==========================-->
<TreeView Name="TreeView1" Grid.Column="0" Grid.Row="2" Margin="4" Visibility="Hidden" AllowDrop="True" Drop="Tree1_drop">
<!--VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode ="Recycling"-->
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type local:RegistryItem}" ItemsSource="{Binding Path=SubItem}">
<TreeViewItem
Selected="TreeViewItem_OnItemSelected"
IsSelected="{Binding IsSelected, Mode=TwoWay}"
Margin="0,-6,0,-6" Padding="0,0,0,0" >
<!--local:BringSelectedItemIntoViewBehavior.IsBringSelectedIntoView="True"-->
<!--IsExpanded="{Binding IsExpanded, Mode=TwoWay}"
Expanded="OnExpanded"-->
<TreeViewItem.Header >
<!-- Affichage par défaut des données -->
<StackPanel Orientation="Horizontal" MinHeight="0" >
<TextBlock x:Name="lbName" Text="{Binding Path=Name}" Width="220" ToolTip="{Binding Path=Name}" ToolTipService.InitialShowDelay="2000" TextTrimming="CharacterEllipsis" VerticalAlignment="Center"/>
<TextBlock x:Name="lbValue" Text="{Binding Path=Value}" ToolTip="{Binding Path=DType}" Width="80" VerticalAlignment="Center" TextTrimming="CharacterEllipsis"/>
<Button x:Name="btUfUnit" Content="{Binding Path=UserFriendlyUnit}" ToolTip="Convert value" Click="Bt_ChangeUnit_Click" Style="{StaticResource OutlinedSmallButton}" Visibility="Hidden" />
<TextBlock x:Name="lbUfValue" Text="{Binding Path=UserFriendlyValue}" Foreground="Green" Visibility="Hidden" Margin="16,0,0,0" VerticalAlignment="Center" />
</StackPanel>
</TreeViewItem.Header>
</TreeViewItem>
<HierarchicalDataTemplate.Triggers>
<!-- Avec un Trigger, on change certaines propriétés dans le cas d'un NODE -->
<DataTrigger Binding="{Binding DType}" Value="node" >
<Setter TargetName="lbName" Property="Foreground" Value="Black" />
<Setter TargetName="lbName" Property="FontWeight" Value="Bold" />
<Setter TargetName="lbName" Property="Width" Value="480" />
<Setter TargetName="lbName" Property="Margin" Value="2" />
<Setter TargetName="lbValue" Property="Visibility" Value="Hidden" />
</DataTrigger>
<!-- Avec un Trigger, on change certaines propriétés dans le cas d'un STRING -->
<DataTrigger Binding="{Binding DType}" Value="REG_SZ" >
<Setter TargetName="lbValue" Property="Width" Value="480" />
<Setter TargetName="lbValue" Property="Foreground" Value="Green" />
</DataTrigger>
<!-- Avec un Trigger, on change certaines propriétés dans le cas d'un DWORD -->
<DataTrigger Binding="{Binding DType}" Value="REG_DWORD" >
<Setter TargetName="btUfUnit" Property="Visibility" Value="Visible" />
<Setter TargetName="lbUfValue" Property="Visibility" Value="Visible" />
</DataTrigger>
</HierarchicalDataTemplate.Triggers>
</HierarchicalDataTemplate>
</TreeView.Resources>
</TreeView>
<!-- ========================== -->
<!-- BOUTON AJOUTER -->
<!-- ========================== -->
<!--<materialDesign:PopupBox Grid.Column="0" Grid.Row="3"
Style="{StaticResource MaterialDesignMultiFloatingActionPopupBox}"
IsEnabled="False"
PlacementMode="LeftAndAlignMiddles"
UnfurlOrientation="Horizontal"
ToolTip="Manage Registry key"
Margin="0 0 10 10" Width="42" Height="42"
HorizontalAlignment="Right" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal">
<Button ToolTip="Add a key" Command="{Binding AddCommand}">
<Path Data="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"
Stretch="Uniform" Width="14" Height="14"
Fill="{Binding RelativeSource={RelativeSource AncestorType=Button}, Path=Foreground}" />
</Button>
<Button ToolTip="Remove selected key" Command="{Binding RemoveSelectedItemCommand}">
<Path Data="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z"
Stretch="Uniform" Width="14" Height="14"
Fill="{Binding RelativeSource={RelativeSource AncestorType=Button}, Path=Foreground}" />
</Button>
</StackPanel>
</materialDesign:PopupBox>-->
<!-- ========================== -->
<!-- BARRE DE RECHERCHE -->
<!-- ========================== -->
<materialDesign:ColorZone Grid.Column="0" Grid.Row="4" Mode="PrimaryDark" Margin="8" CornerRadius="8" IsEnabled="{Binding ElementName=TreeView1, Path=IsVisible}" materialDesign:ShadowAssist.ShadowDepth="Depth3">
<Grid Margin="8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<!-- Icone et label -->
<materialDesign:PackIcon Grid.Column="0" Kind="Search" Height="32" Width="32" VerticalAlignment="Center"/>
<TextBlock Grid.Column="1" Margin="8" Text="Registry key:" VerticalAlignment="Center"/>
<!-- Champs de saisie -->
<materialDesign:ColorZone Grid.Column="2" Mode="Light" Height="32" CornerRadius="4" materialDesign:ShadowAssist.ShadowDepth="Depth2" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" Margin="2" >
<materialDesign:PackIcon Kind="Magnify" VerticalAlignment="Center" />
<TextBox Margin="8 0 12 4" materialDesign:HintAssist.Hint="Enter a key name to search..." Width="400" Name="Tb_SearchedWord" TextChanged="Tb_SearchedWord_TextChanged" />
</StackPanel>
</materialDesign:ColorZone>
<!-- Bouton FIND -->
<Button Grid.Column="3" Margin="8 0 0 0" Click="Bt_Search_Click" x:Name="Bt_Search" VerticalAlignment="Center" Content="Find"/>
<!--Bouton SEARCH DIRECTION-->
<!--
PopupMode="Click"
ToggleCheckedContentCommand="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=wpfExample:Buttons}, Path=FloatingActionDemoCommand}"
Visibility={Binding Path=IsPopupOpen, ElementName=SearchDirButton, Converter={StaticResource BoolToVisibilityConverter}}
-->
<materialDesign:PopupBox Name="Bt_SearchDirection" Grid.Column="4" Height="48" Width="48"
Style="{StaticResource MaterialDesignMultiFloatingActionDarkPopupBox}"
IsEnabled="{Binding ElementName=Bt_Search, Path=IsEnabled}"
PlacementMode="RightAndAlignTopEdges"
ToggleCheckedContentCommandParameter="wowsers"
Margin="8 0 0 0"
ToolTip="Change search direction">
<!--Bouton principal-->
<materialDesign:PopupBox.ToggleCheckedContent>
<materialDesign:PackIcon Kind="Search" Width="24" Height="24" />
</materialDesign:PopupBox.ToggleCheckedContent>
<!--Sous-boutons-->
<StackPanel Visibility="Visible" Orientation="Horizontal" Margin="8 0 0 0" >
<Button ToolTip="Search up" Click="Bt_SearchUp_Click" >
<materialDesign:PackIcon Kind="TransferUp" Width="24" Height="24" />
</Button>
<Button ToolTip="Search down" Click="Bt_SearchDown_Click">
<materialDesign:PackIcon Kind="TransferDown" Width="24" Height="24" />
</Button>
<TextBlock VerticalAlignment="Center" Name="Lb_SearchedWordCount" Foreground="{DynamicResource ResourceKey=PrimaryHueDarkBrush}" />
</StackPanel>
</materialDesign:PopupBox>
</Grid>
</materialDesign:ColorZone>
<!-- *************************************************************** -->
<!-- Separateur -->
<!-- *************************************************************** -->
<!--GridSplitter Grid.Column="1" Grid.RowSpan="5" Width="5" HorizontalAlignment="Stretch" -->
</Grid>
<!-- *************************************************************** -->
<!-- Grille de droite -->
<!-- *************************************************************** -->
<!--
<TreeView.Resources>
<HierarchicalDataTemplate
DataType="{x:Type local:RegistryItem}"
ItemsSource="{Binding Path=SubItem}">
<StackPanel Orientation="Horizontal" MinHeight="0" Margin="0,-6,0,-6" >
<TextBlock x:Name="lbName" Text="{Binding Path=Name}" Width="220" ToolTip="{Binding Path=Name}" ToolTipService.InitialShowDelay="2000" VerticalAlignment="Center"/>
<TextBlock x:Name="lbValue" Text="{Binding Path=Value}" ToolTip="{Binding Path=DType}" Width="80" />
</StackPanel>
</HierarchicalDataTemplate>
</TreeView.Resources>
-->
<!--==========================================================-->
<!-- POPUP D'INFOS SUR LE TREEVIEW -->
<!--==========================================================-->
<!-- NOTES:
PlacementTarget="{Binding ElementName=bTray2Button1}"
Placement="Bottom" Placement="Mouse"
IsOpen="{Binding ElementName=bTray2Button1,Path=IsMouseOver}"
// Popup peut etre animé uniquement si le bouton ne l'est pas
AllowsTransparency="True" PopupAnimation="Slide"
HorizontalAlignment="Center" VerticalAlignment="Top"
-->
<Popup Name="Pu_TreeInfos" Margin="10,10,0,13" IsOpen="False" Placement="Mouse" AllowsTransparency="True" >
<Grid>
<materialDesign:Card Margin="12" materialDesign:ShadowAssist.ShadowDepth="Depth3" UniformCornerRadius="8" Background="{DynamicResource PrimaryHueLightBrush}" Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}">
<!--Padding="0" Width="200"-->
<Grid>
<!--Grid de 7 lignes-->
<Grid.RowDefinitions>
<RowDefinition Height="Auto" Name="logo_0"/>
<RowDefinition Height="Auto" Name="titre_1" />
<RowDefinition Height="Auto" Name="sepline_2" />
<RowDefinition Height="Auto" Name="nb_nodes_3" />
<RowDefinition Height="Auto" Name="nb_levels_4"/>
<RowDefinition Height="Auto" Name="nb_keys_5"/>
<RowDefinition Height="Auto" Name="sepline_and_close_6" />
</Grid.RowDefinitions>
<!--Logo-->
<materialDesign:ColorZone Grid.Row="0" Mode="PrimaryDark" VerticalAlignment="Stretch">
<materialDesign:PackIcon Kind="ChartBarStacked" Height="48" Width="48" VerticalAlignment="Center" HorizontalAlignment="Center" />
</materialDesign:ColorZone>
<!--Titre-->
<TextBlock Grid.Row="1" Margin="18 6 18 0" HorizontalAlignment="Center" Style="{StaticResource MaterialDesignHeadlineTextBlock}" Foreground="{DynamicResource ResourceKey=PrimaryHueDarkBrush}" Text="Tree Infos" />
<!--Separator line-->
<Separator Grid.Row="2" Style="{StaticResource MaterialDesignLightSeparator}" />
<!--Levels count-->
<StackPanel Grid.Row="3" Orientation="Horizontal" Margin="12,2,0,0">
<TextBlock Text="Nb of levels"/>
<TextBlock Name="tbStatLevels" Margin="12,0,0,0" />
</StackPanel>
<!--Node count-->
<StackPanel Grid.Row="4" Orientation="Horizontal" Margin="12,2,0,0">
<TextBlock Text="Nb of nodes" />
<TextBlock Name="tbStatNodes" Margin="12,0,0,0" />
</StackPanel>
<!--Keys count-->
<StackPanel Grid.Row="5" Orientation="Horizontal" Margin="12,2,0,0">
<TextBlock Text="Nb of keys"/>
<TextBlock Name="tbStatKeys" Margin="12,0,0,0"/>
</StackPanel>
<!--separator line-->
<Separator Grid.Row="6" Style="{StaticResource MaterialDesignLightSeparator}" />
<!--Close Button-->
<Button Grid.Row="6" HorizontalAlignment="Right" Width="30" Style="{StaticResource MaterialDesignToolForegroundButton}" Click="Bt_TreeInfos_Close" materialDesign:RippleAssist.IsCentered="True">
<materialDesign:PackIcon Kind="CloseCircleOutline" />
</Button>
</Grid>
</materialDesign:Card>
</Grid>
</Popup>
<!--==========================================================-->
<!-- POPUP DE STATISTIQUES SUR LE TREEVIEW -->
<!--==========================================================-->
<Popup Name="CardlengthStats" Margin="10,10,0,13" IsOpen="False" Placement="Mouse" AllowsTransparency="True" >
<Grid>
<materialDesign:Card Margin="12" materialDesign:ShadowAssist.ShadowDepth="Depth3" UniformCornerRadius="8" Background="{DynamicResource PrimaryHueLightBrush}" Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}">
<!--Padding="0" Width="200"-->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<materialDesign:ColorZone Grid.Row="0" Grid.ColumnSpan="3" Mode="PrimaryDark" VerticalAlignment="Stretch">
<materialDesign:PackIcon Kind="ChartGantt" Height="48" Width="48" VerticalAlignment="Center" HorizontalAlignment="Center" />
</materialDesign:ColorZone>
<TextBlock Grid.Row="1" Grid.ColumnSpan="3" Margin="18 6 18 0" HorizontalAlignment="Center" Style="{StaticResource MaterialDesignHeadlineTextBlock}" Foreground="{DynamicResource ResourceKey=PrimaryHueDarkBrush}" Text="Length stats" />
<Separator Grid.Row="2" Style="{StaticResource MaterialDesignLightSeparator}" />
<!--Label count-->
<TextBlock Grid.Row="3" Grid.Column="0" Text="Number of labels" Margin="12,0,0,0" />
<TextBlock Grid.Row="3" Grid.Column="1" Text="(total)" />
<TextBlock Grid.Row="3" Grid.Column="2" Name="nbItems" Margin="12,0,0,0"/>
<!--Average length-->
<TextBlock Grid.Row="4" Grid.Column="0" Text="Average length" Margin="12,0,0,0" />
<TextBlock Grid.Row="4" Grid.Column="1" Name="tbAvLength" Margin="12,0,0,0" />
<TextBlock Grid.Row="4" Grid.Column="2" Name="nbAvLength" Margin="12,0,12,0" />
<!--Modal length-->
<TextBlock Grid.Row="5" Grid.Column="0" Text="Modal length" Margin="12,2,0,0"/>
<TextBlock Grid.Row="5" Grid.Column="1" Name="tbModelength" Margin="12,0,0,0" />
<TextBlock Grid.Row="5" Grid.Column="2" Name="nbModelength" Margin="12,0,0,0" />
<!--Ecart Type-->
<TextBlock Grid.Row="6" Grid.Column="0" Text="Standard Deviation" Margin="12,0,0,0"/>
<TextBlock Grid.Row="6" Grid.Column="1" Name="tbSD" Margin="12,0,0,0"/>
<TextBlock Grid.Row="7" Grid.Column="0" Text="Inf Av+SD (84%)" Margin="12,0,0,0"/>
<TextBlock Grid.Row="7" Grid.Column="1" Name="tbSD84" Margin="12,0,0,0"/>
<TextBlock Grid.Row="7" Grid.Column="2" Name="nbSD84" Margin="12,0,0,0"/>
<TextBlock Grid.Row="8" Grid.Column="0" Text="Inf Av+2*SD (98%)" Margin="12,0,0,0"/>
<TextBlock Grid.Row="8" Grid.Column="1" Name="tbSD98" Margin="12,0,0,0"/>
<TextBlock Grid.Row="8" Grid.Column="2" Name="nbSD98" Margin="12,0,0,0"/>
<Button Grid.Row="9" Grid.Column="2" HorizontalAlignment="Right" Width="30"
Style="{StaticResource MaterialDesignToolForegroundButton}"
Click="Bt_LengthStats_Close"
materialDesign:RippleAssist.IsCentered="True">
<materialDesign:PackIcon Kind="CloseCircleOutline" />
</Button>
</Grid>
</materialDesign:Card>
</Grid>
</Popup>
<!--==========================================================-->
<!-- SABLIER -->
<!--==========================================================-->
<Popup Name="Pu_Working" IsOpen="False" Placement="Center" AllowsTransparency="True" >
<materialDesign:Card UniformCornerRadius="25" Width="50" Height="50" Margin="10">
<materialDesign:PackIcon Kind="TimerSand" Height="40" Width="40" VerticalAlignment="Center" HorizontalAlignment="Center" />
<!--<ProgressBar Style="{StaticResource MaterialDesignCircularProgressBar}" Value="40" IsIndeterminate="True" />-->
</materialDesign:Card>
</Popup>
<!--==========================================================-->
<!-- POPUP of RECENT TREES -->
<!--==========================================================-->
<!-- NOTES:
PlacementTarget="{Binding ElementName=bTray2Button1}"
Placement="Bottom" Placement="Mouse"
-->
<Popup Name="Pu_Recent" Margin="10,10,0,13" Placement="Mouse" AllowsTransparency="True" >
<materialDesign:Card Margin="12" materialDesign:ShadowAssist.ShadowDepth="Depth3" UniformCornerRadius="8" Background="{DynamicResource PrimaryHueLightBrush}" Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}">
<!--Padding="0" Width="200"-->
<StackPanel Name="Sp_RecentStack" Orientation="Vertical" >
<StackPanel.Resources>
<!-- Style for the chips of this Popup -->
<Style TargetType="materialDesign:Chip" >
<Setter Property="Margin" Value="8,2,8,2"/>
<Setter Property="IsDeletable" Value="True"/>
<Setter Property="DeleteToolTip" Value="Remove"/>
<Setter Property="FontSize" Value="12"/>
</Style>
</StackPanel.Resources>
<!--Logo-->
<materialDesign:ColorZone Grid.Row="0" Mode="PrimaryDark" VerticalAlignment="Stretch">
<materialDesign:PackIcon Kind="Recent" Height="48" Width="48" VerticalAlignment="Center" HorizontalAlignment="Center" />
</materialDesign:ColorZone>
<!--Titre-->
<TextBlock Margin="18 6 18 0" HorizontalAlignment="Center" Style="{StaticResource MaterialDesignHeadlineTextBlock}" Foreground="{DynamicResource ResourceKey=PrimaryHueDarkBrush}" Text="recent registries" />
<Separator Style="{StaticResource MaterialDesignLightSeparator}" />
<!--Recent trees. Index: 3 et svts -->
<!--Le StackPanel contient des Chips-->
<StackPanel Name="Sp_Recents" Orientation="Vertical" >
<StackPanel.Resources>
<!-- Dans le template, on binde le Content et le PackIcon du Chip dans "RecentRegDataTemplate" -->
<!-- "RecentRegDataTemplate" est le template du Controle "RecentRegData" -->
<!-- Le controle "RecentRegData" a pour ItemsSource la liste "RecentRegs" -->
<!-- Chaque element "RecentReg" de la liste "RecentRegs" a une propriété "Name" et "Icon" -->
<DataTemplate x:Key="RecentRegDataTemplate">
<materialDesign:Chip Content="{Binding Path=Name}" DeleteClick="Bt_RecentChip_Remove" Click="Bt_RecentChip_Click" >
<materialDesign:Chip.Icon>
<materialDesign:PackIcon Kind="{Binding Path=Icon}"/>
</materialDesign:Chip.Icon>
</materialDesign:Chip>
</DataTemplate>
</StackPanel.Resources>
<!--Le StackPanel "RecentRegData" est bindé à la liste "RecentsRegs" dans le Code-behind-->
<ItemsControl x:Name="RecentRegData" ItemTemplate="{StaticResource RecentRegDataTemplate}" >
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</StackPanel>
<!--separator line-->
<!--<Separator Style="{StaticResource MaterialDesignLightSeparator}" />-->
<!--Close Button-->
<Button HorizontalAlignment="Right" Width="30" Style="{StaticResource MaterialDesignToolForegroundButton}" Click="Pu_OpenRecent_Close" materialDesign:RippleAssist.IsCentered="True">
<materialDesign:PackIcon Kind="CloseCircleOutline" />
</Button>
</StackPanel>
</materialDesign:Card>
</Popup>
<!--==========================================================-->
<!-- POPUP DE SELECTION DU SUBTREE EN BASE DE REGISTRES -->
<!--==========================================================-->
<Popup Name="Pu_SelectHive" Margin="10,10,0,13" IsOpen="False" Placement="Mouse" AllowsTransparency="True" >
<Grid>
<materialDesign:Card Margin="12" materialDesign:ShadowAssist.ShadowDepth="Depth3" UniformCornerRadius="8" Background="{DynamicResource PrimaryHueLightBrush}" Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}">
<!--Padding="0" Width="200"-->
<StackPanel Orientation="Vertical">
<materialDesign:ColorZone Mode="PrimaryDark" VerticalAlignment="Stretch">
<materialDesign:PackIcon Kind="OpenInApp" Height="48" Width="48" VerticalAlignment="Center" HorizontalAlignment="Center" />
</materialDesign:ColorZone>
<TextBlock Text="Import registry subtree" Margin="18 6 18 0" HorizontalAlignment="Center" Style="{StaticResource MaterialDesignHeadlineTextBlock}" Foreground="{DynamicResource ResourceKey=PrimaryHueDarkBrush}" />
<Separator Style="{StaticResource MaterialDesignLightSeparator}" />
<StackPanel Orientation="Horizontal" Margin="12,2,0,0" >
<TextBlock Text="HKLM\" VerticalAlignment="Center"/>
<TextBlock Name="Tb_HivePath" Text="{Binding Path=HivePath}" VerticalAlignment="Center"/>
<ComboBox Name="Cb_SelectHive" Margin="12,0,0,0" MinWidth="48" SelectionChanged="Cb_SelectHive_SelectionChanged" VerticalAlignment="Top">
<!--<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>-->
</ComboBox>
<Button HorizontalAlignment="Right" Width="30" Name="Bt_SelectHiveBack"
Style="{StaticResource MaterialDesignToolForegroundButton}" materialDesign:RippleAssist.IsCentered="True"
Click="Bt_SelectHive_Back" Visibility="Hidden">
<materialDesign:PackIcon Kind="ArrowBackCircle" />
</Button>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="8">
<Button Style="{StaticResource MaterialDesignRaisedButton}" Width="80" Content="Import" Margin="4,0,0,0" Click="Bt_SelectHive_Import"/>
<Button Style="{StaticResource MaterialDesignRaisedLightButton}" Width="80" Content="Cancel" Margin="4,0,0,0" Click="Bt_SelectHive_Close"/>
</StackPanel>
</StackPanel>
</materialDesign:Card>
</Grid>
</Popup>
<!--==========================================================-->
<!-- ESSAIS DIVERS -->
<!--==========================================================-->
<!--
PlacementTarget="{Binding ElementName=bTray2Button1}" Placement="Bottom"
IsOpen="{Binding ElementName=bTray2Button1,Path=IsMouseOver}"
-->
<!--
<materialDesign:ColorZone Grid.Row="0" Mode="PrimaryDark" VerticalAlignment="Stretch">
<materialDesign:PackIcon Kind="ChartBarStacked" HorizontalAlignment="Center" />
</materialDesign:ColorZone>
<TextBlock Grid.Row="1" Margin="16 16 16 4" Style="{StaticResource MaterialDesignHeadlineTextBlock}" Foreground="{DynamicResource ResourceKey=PrimaryHueDarkBrush}">
Tree statistics:
</TextBlock>
<Separator Grid.Row="2" Style="{StaticResource MaterialDesignLightSeparator}" />
<Button Grid.Row="4" HorizontalAlignment="Right" Style="{StaticResource MaterialDesignToolForegroundButton}" Width="30" Padding="2 0 2 0" materialDesign:RippleAssist.IsCentered="True">
<materialDesign:PackIcon Kind="Phone" />
</Button>
<materialDesign:PopupBox Style="{StaticResource MaterialDesignToolForegroundPopupBox}" HorizontalAlignment="Right" />
<StackPanel>
<TextBlock Text="{Binding ElementName=TreeView2, Path=ActualWidth}" Margin="12,0,0,0" />
<TextBlock Text="{Binding ElementName=dockpanel, Path=ActualWidth}" Margin="12,0,0,0" />
<TextBlock Text="Nb of levels" Style="{StaticResource MaterialDesignBody2TextBlock}"/>
</StackPanel>
-->
</DockPanel>
</Window>