-
Notifications
You must be signed in to change notification settings - Fork 4
/
MainWindow.xaml
536 lines (523 loc) · 26.4 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
<ribbon:RibbonWindow x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=System.Windows.Controls.Ribbon"
xmlns:local="clr-namespace:DotNetNuke.Translator"
xmlns:com="clr-namespace:DotNetNuke.Translator.Common"
xmlns:vm="clr-namespace:DotNetNuke.Translator.ViewModel"
xmlns:vw="clr-namespace:DotNetNuke.Translator.View"
Title="MainWindow" ResizeMode="CanResizeWithGrip"
x:Name="MainWindow"
Width="1000" Height="800" Icon="/Translator;component/applications-internet-3.ico">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="MainWindowResources.xaml" />
<ResourceDictionary Source="Icons.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Window.InputBindings>
<KeyBinding
Key="A"
Modifiers="Control"
Command="{Binding Path=KeyboardCommand}"
CommandParameter="SelectAll"
/>
</Window.InputBindings>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="50"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ribbon:Ribbon x:Name="Ribbon">
<ribbon:Ribbon.HelpPaneContent>
<ribbon:RibbonButton SmallImageSource="{StaticResource HelpApplication}" />
</ribbon:Ribbon.HelpPaneContent>
<ribbon:Ribbon.QuickAccessToolBar>
<ribbon:RibbonQuickAccessToolBar >
<ribbon:RibbonButton
ToolTipTitle="Save changes"
ToolTipDescription="Save changes to the resource files"
Command="{Binding ActiveResourceCollection.SaveCommand}"
IsEnabled="{Binding Path=ActiveResourceCollection.HasChanges, FallbackValue=False}"
SmallImageSource="{StaticResource Save}" />
</ribbon:RibbonQuickAccessToolBar>
</ribbon:Ribbon.QuickAccessToolBar>
<ribbon:Ribbon.ApplicationMenu>
<ribbon:RibbonApplicationMenu SmallImageSource="{StaticResource HamburgerMenu}" KeyTip="F">
<ribbon:RibbonApplicationMenuItem Header="_New" Command="{Binding Path=NewCommand}" KeyTip="N" ImageSource="{StaticResource NewItem}" />
<ribbon:RibbonApplicationSplitMenuItem Header="_Open" ItemsSource="{Binding Path=RecentLocationsList}" Command="{Binding Path=OpenCommand}" KeyTip="O" ImageSource="{StaticResource Open}">
<ribbon:RibbonApplicationSplitMenuItem.ItemContainerStyle>
<Style TargetType="{x:Type ribbon:RibbonApplicationMenuItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<ribbon:RibbonApplicationMenuItem Header="{Binding Path=LocationShort}" Command="{Binding Path=Command}" CommandParameter="{Binding Path=Location}" KeyTip="{Binding Path=Index}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ribbon:RibbonApplicationSplitMenuItem.ItemContainerStyle>
</ribbon:RibbonApplicationSplitMenuItem>
<ribbon:RibbonApplicationMenuItem Header="_Save" Command="{Binding Path=SaveCommand}" KeyTip="S" ImageSource="{StaticResource Save}" />
<ribbon:RibbonApplicationMenuItem Header="Save As" Command="{Binding Path=SaveAsCommand}" ImageSource="{StaticResource SaveAs}" />
<ribbon:RibbonApplicationMenuItem Header="Options" Command="{Binding Path=OptionsCommand}" ImageSource="{StaticResource Settings}" />
<ribbon:RibbonApplicationMenuItem Header="Exit" Command="{Binding Path=CloseCommand}" ImageSource="{StaticResource Exit}" />
<ribbon:RibbonApplicationMenuItem IsEnabled="False" />
<ribbon:RibbonApplicationMenuItem IsEnabled="False" />
<ribbon:RibbonApplicationMenuItem IsEnabled="False" />
<ribbon:RibbonApplicationMenuItem IsEnabled="False" />
<ribbon:RibbonApplicationMenu.FooterPaneContent>
<DockPanel LastChildFill="False">
<ribbon:RibbonButton Command="{Binding Path=CloseCommand}"
Label="Exit"
ToolTipTitle="Exit"
SmallImageSource="{StaticResource Exit}"
KeyTip="X"
DockPanel.Dock="Right"
Margin="2"
BorderBrush="#B8114EAF" />
<ribbon:RibbonButton Command="{Binding Path=OptionsCommand}"
Label="Options"
ToolTipTitle="Options"
SmallImageSource="{StaticResource Settings}"
DockPanel.Dock="Right"
Margin="2"
BorderBrush="#B8114EAF" />
</DockPanel>
</ribbon:RibbonApplicationMenu.FooterPaneContent>
</ribbon:RibbonApplicationMenu>
</ribbon:Ribbon.ApplicationMenu>
<ribbon:RibbonTab x:Name="HomeTab" Header="Home" KeyTip="H">
<ribbon:RibbonGroup x:Name="ProjectGroup" Header="Project">
<ribbon:RibbonButton
Label="Clean"
LargeImageSource="{StaticResource CleanData}"
ToolTipTitle="Clean All Resources"
ToolTipDescription="Parse and resave all resx files and remove keys that are not there in the original"
Command="{Binding Path=CleanProjectCommand}"
/>
</ribbon:RibbonGroup>
<ribbon:RibbonGroup x:Name="EditGroup" Header="Edit">
<ribbon:RibbonButton
Label="Save"
LargeImageSource="{StaticResource Save}"
ToolTipTitle="Save changes"
ToolTipDescription="Save changes to the resource files"
Command="{Binding ActiveResourceCollection.SaveCommand}"
IsEnabled="{Binding Path=ActiveResourceCollection.HasChanges, FallbackValue=False}"
/>
<ribbon:RibbonButton
Label="Html"
LargeImageSource="{StaticResource HTMLEndTag}"
ToolTipTitle="Edit As Html"
ToolTipDescription="Edit the selected key as HTML"
Command="{Binding ActiveResourceCollection.EditHtmlCommand}"
IsEnabled="{Binding Path=HasActiveResourceCollection, FallbackValue=False}"
/>
</ribbon:RibbonGroup>
<ribbon:RibbonGroup x:Name="Clipboard" Header="Clipboard">
<ribbon:RibbonButton
Label="Cut"
SmallImageSource="{StaticResource Cut}"
ToolTipTitle="Cut (Ctrl+X)"
ToolTipDescription="Cut the selection and put it on the Clipboard."
Command="Cut"
KeyTip="X" />
<ribbon:RibbonButton
Label="Copy"
SmallImageSource="{StaticResource Copy}"
ToolTipTitle="Copy (Ctrl+C)"
ToolTipDescription="Copy selection and put it on the Clipboard."
Command="Copy"
KeyTip="C" />
<ribbon:RibbonButton
Label="Paste"
SmallImageSource="{StaticResource Paste}"
ToolTipTitle="Paste (Ctrl+V)"
ToolTipDescription="Paste the contents of the Clipboard."
Command="Paste"
KeyTip="V" />
</ribbon:RibbonGroup>
<ribbon:RibbonGroup x:Name="SearchGroup" Header="Search">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBox Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" x:Name="txtSearchString" Text="{Binding SearchString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<ribbon:RibbonButton
Grid.Column="0" Grid.Row="1"
Label="All"
SmallImageSource="{StaticResource Search}"
ToolTipTitle="Search all of DotNetNuke"
ToolTipDescription="Search the complete installation for this text"
Command="{Binding Path=SearchCommand}"
/>
<ribbon:RibbonButton
Grid.Column="1" Grid.Row="1"
Label="Module"
SmallImageSource="{StaticResource Search}"
ToolTipTitle="Search module"
ToolTipDescription="Search the selected module resources for this text"
Command="{Binding Path=SearchCommand}"
CommandParameter="Module"
IsEnabled="{Binding Path=SaveModuleSnapshotEnabled, FallbackValue=False}"
/>
</Grid>
</ribbon:RibbonGroup>
<ribbon:RibbonGroup x:Name="TranslationServiceGroup" Header="Translation Service"
IsEnabled="{Binding Path=ActiveResourceCollection.Exists, FallbackValue=False}">
<ribbon:RibbonSplitButton
Label="Translate To Target"
LargeImageSource="{StaticResource TranslateDocument}"
ToolTipTitle="Selected To Target"
ToolTipDescription="Attempt to translate all selected keys"
Command="{Binding ActiveResourceCollection.TranslationServiceTranslateCommand}"
CommandParameter="Selected,2Target"
IsEnabled="{Binding Path=ActiveResourceCollection.HasTranslationServiceLocale, FallbackValue=False}">
<ribbon:RibbonButton
Label="All"
SmallImageSource="{StaticResource TranslateDocument}"
ToolTipTitle="All To Target"
ToolTipDescription="Attempt to translate all keys and overwrite any existing values on target"
Command="{Binding ActiveResourceCollection.TranslationServiceTranslateCommand}"
CommandParameter="All,2Target" />
<ribbon:RibbonButton
Label="Empty"
SmallImageSource="{StaticResource TranslateDocument}"
ToolTipTitle="Empty To Target"
ToolTipDescription="Attempt to translate all empty keys"
Command="{Binding ActiveResourceCollection.TranslationServiceTranslateCommand}"
CommandParameter="Empty,2Target" />
</ribbon:RibbonSplitButton>
<ribbon:RibbonSplitButton
Label="Translate To Temp"
LargeImageSource="{StaticResource TranslateDocument}"
ToolTipTitle="Selected To Temp"
ToolTipDescription="Attempt to translate all selected keys and put the value in the comparison column"
Command="{Binding ActiveResourceCollection.TranslationServiceTranslateCommand}"
CommandParameter="Selected,2Compare"
IsEnabled="{Binding Path=ActiveResourceCollection.HasTranslationServiceLocale, FallbackValue=False}">
<ribbon:RibbonButton
Label="All"
SmallImageSource="{StaticResource TranslateDocument}"
ToolTipTitle="All To Temp"
ToolTipDescription="Attempt to translate all keys to the comparison column"
Command="{Binding ActiveResourceCollection.TranslationServiceTranslateCommand}"
CommandParameter="All,2Compare" />
<ribbon:RibbonButton
Label="Empty"
SmallImageSource="{StaticResource TranslateDocument}"
ToolTipTitle="Empty To Temp"
ToolTipDescription="Attempt to translate all empty keys and put the value in the comparison column"
Command="{Binding ActiveResourceCollection.TranslationServiceTranslateCommand}"
CommandParameter="Empty,2Compare" />
</ribbon:RibbonSplitButton>
<ribbon:RibbonComboBox Width="110">
<ribbon:RibbonGallery SelectedItem="{Binding Path=ActiveResourceCollection.TranslationServiceLocale}">
<ribbon:RibbonGalleryCategory ItemsSource="{Binding Path=TranslationServiceLocales}" DisplayMemberPath="EnglishName">
</ribbon:RibbonGalleryCategory>
</ribbon:RibbonGallery>
</ribbon:RibbonComboBox>
</ribbon:RibbonGroup>
<ribbon:RibbonGroup x:Name="CopyGroup" Header="Copy"
IsEnabled="{Binding Path=ActiveResourceCollection.Exists, FallbackValue=False}">
<ribbon:RibbonSplitButton
Label="Original To Target"
ToolTipTitle="Copy Selected Original To Target"
ToolTipDescription="Copy resources from original values to target for the selected keys"
Command="{Binding Path=ActiveResourceCollection.CopyAllCommand}"
CommandParameter="Selected,Original2Target"
LargeImageSource="{StaticResource FormatPageRight}">
<ribbon:RibbonButton
Label="All"
SmallImageSource="{StaticResource FormatPageRight}"
ToolTipTitle="Copy All Original To Target"
ToolTipDescription="Copy all resources from original values to target overwriting any previous work"
Command="{Binding Path=ActiveResourceCollection.CopyAllCommand}"
CommandParameter="All,Original2Target" />
<ribbon:RibbonButton
Label="Empty"
SmallImageSource="{StaticResource FormatPageRight}"
ToolTipTitle="Copy Empty Original To Target"
ToolTipDescription="Copy resources from original values to target where there is no target value"
Command="{Binding Path=ActiveResourceCollection.CopyAllCommand}"
CommandParameter="Empty,Original2Target" />
</ribbon:RibbonSplitButton>
<ribbon:RibbonSplitButton
Label="Temp To Target"
LargeImageSource="{StaticResource FormatPageLeft}"
ToolTipTitle="Copy Selected From Temp To Target"
ToolTipDescription="Copy resources from comparison values to target for the selected keys"
Command="{Binding Path=ActiveResourceCollection.CopyAllCommand}"
CommandParameter="Selected,Compare2Target"
IsEnabled="{Binding Path=ActiveResourceCollection.ShowCompareColumn, FallbackValue=False}">
<ribbon:RibbonButton
Label="All"
SmallImageSource="{StaticResource FormatPageLeft}"
ToolTipTitle="Copy All From Temp To Target"
ToolTipDescription="Copy all resources from comparison values to target overwriting any previous work"
Command="{Binding Path=ActiveResourceCollection.CopyAllCommand}"
CommandParameter="All,Compare2Target" />
<ribbon:RibbonButton
Label="Empty"
SmallImageSource="{StaticResource FormatPageLeft}"
ToolTipTitle="Copy Empty From Temp To Target"
ToolTipDescription="Copy resources from comparison values to target where there is no target value"
Command="{Binding Path=ActiveResourceCollection.CopyAllCommand}"
CommandParameter="Empty,Compare2Target" />
</ribbon:RibbonSplitButton>
</ribbon:RibbonGroup>
<ribbon:RibbonGroup x:Name="DictionaryGroup" Header="Dictionary">
<ribbon:RibbonButton
Label="Compare"
LargeImageSource="{StaticResource CompareFiles}"
ToolTipTitle="Compare With Dictionary"
ToolTipDescription="Compare the current values with what is in the dictionary"
Command="{Binding Path=ActiveResourceCollection.ShowDicEntriesCommand}"
IsEnabled="{Binding Path=HasActiveResourceCollection, FallbackValue=False}" />
<ribbon:RibbonSplitButton
Label="Add To Dictionary"
LargeImageSource="{StaticResource TranslateDocument}"
ToolTipTitle="Selected To Target"
ToolTipDescription="Attempt to translate all selected keys"
Command="{Binding ActiveResourceCollection.AddToDictionaryCommand}"
CommandParameter="Selected"
IsEnabled="{Binding Path=HasActiveResourceCollection, FallbackValue=False}">
<ribbon:RibbonButton
Label="All"
SmallImageSource="{StaticResource TranslateDocument}"
ToolTipTitle="All To Target"
ToolTipDescription="Attempt to translate all keys and overwrite any existing values on target"
Command="{Binding ActiveResourceCollection.AddToDictionaryCommand}"
CommandParameter="All" />
</ribbon:RibbonSplitButton>
<ribbon:RibbonSplitButton
Label="Translate To Target"
LargeImageSource="{StaticResource TranslateDocument}"
ToolTipTitle="Selected To Target"
ToolTipDescription="Attempt to translate all selected keys"
Command="{Binding ActiveResourceCollection.GetFromDictionaryCommand}"
CommandParameter="Selected,2Target"
IsEnabled="{Binding Path=HasActiveResourceCollection, FallbackValue=False}">
<ribbon:RibbonButton
Label="All"
SmallImageSource="{StaticResource TranslateDocument}"
ToolTipTitle="All To Target"
ToolTipDescription="Attempt to translate all keys and overwrite any existing values on target"
Command="{Binding ActiveResourceCollection.GetFromDictionaryCommand}"
CommandParameter="All,2Target" />
<ribbon:RibbonButton
Label="Empty"
SmallImageSource="{StaticResource TranslateDocument}"
ToolTipTitle="Empty To Target"
ToolTipDescription="Attempt to translate all empty keys"
Command="{Binding ActiveResourceCollection.GetFromDictionaryCommand}"
CommandParameter="Empty,2Target" />
</ribbon:RibbonSplitButton>
<ribbon:RibbonSplitButton
Label="Translate To Temp"
LargeImageSource="{StaticResource TranslateDocument}"
ToolTipTitle="Selected To Temp"
ToolTipDescription="Attempt to translate all selected keys and put the value in the comparison column"
Command="{Binding ActiveResourceCollection.GetFromDictionaryCommand}"
CommandParameter="Selected,2Compare"
IsEnabled="{Binding Path=HasActiveResourceCollection, FallbackValue=False}">
<ribbon:RibbonButton
Label="All"
SmallImageSource="{StaticResource TranslateDocument}"
ToolTipTitle="All To Temp"
ToolTipDescription="Attempt to translate all keys to the comparison column"
Command="{Binding ActiveResourceCollection.GetFromDictionaryCommand}"
CommandParameter="All,2Compare" />
<ribbon:RibbonButton
Label="Empty"
SmallImageSource="{StaticResource TranslateDocument}"
ToolTipTitle="Empty To Temp"
ToolTipDescription="Attempt to translate all empty keys and put the value in the comparison column"
Command="{Binding ActiveResourceCollection.GetFromDictionaryCommand}"
CommandParameter="Empty,2Compare" />
</ribbon:RibbonSplitButton>
</ribbon:RibbonGroup>
</ribbon:RibbonTab>
<ribbon:RibbonTab x:Name="ComponentTab" Header="Component" KeyTip="I" IsEnabled="{Binding Path=HasSelectedPackage, FallbackValue=False}">
<ribbon:RibbonGroup x:Name="AnalyzeGroup" Header="Analyze">
<ribbon:RibbonButton
Label="Analyze"
LargeImageSource="{StaticResource Analysis}"
ToolTipTitle="Check Translation"
ToolTipDescription="Checks the current translation for missing translations"
Command="{Binding Path=VerifyResourcesCommand}"
/>
<ribbon:RibbonButton
Label="Clean"
LargeImageSource="{StaticResource CleanData}"
ToolTipTitle="Clean Resources"
ToolTipDescription="Parse and resave all resx files and remove keys that are not there in the original"
Command="{Binding Path=CleanCommand}"
/>
</ribbon:RibbonGroup>
<ribbon:RibbonGroup x:Name="SnapshotGroup" Header="Snapshot">
<ribbon:RibbonButton
Label="Save"
LargeImageSource="{StaticResource TakeSnapshot}"
ToolTipTitle="Save Snapshot"
ToolTipDescription="Save the current original resources as a snapshot"
Command="{Binding Path=SaveSnapshotCommand}"
/>
<ribbon:RibbonButton
Label="Compare"
LargeImageSource="{StaticResource CompareFiles}"
ToolTipTitle="Compare With Snapshot"
ToolTipDescription="Compare the current original resources with a snapshot"
Command="{Binding Path=CompareSnapshotCommand}"
/>
</ribbon:RibbonGroup>
<ribbon:RibbonGroup x:Name="LEMergeGroup" Header="Merge">
<ribbon:RibbonButton
Label="Compare"
LargeImageSource="{StaticResource CompareDatabases}"
ToolTipTitle="Compare With Server"
ToolTipDescription="Compare the current original resources with what is on the server"
Command="{Binding Path=LECompareCommand}"
/>
<ribbon:RibbonSplitButton
Label="Upload"
LargeImageSource="{StaticResource CloudUpload}"
ToolTipTitle="Upload selected keys in this view to the server"
ToolTipDescription="Upload keys in this view to a DNN installation with the Localization Editor"
Command="{Binding ActiveResourceCollection.UploadCommand}"
CommandParameter="Selected">
<ribbon:RibbonButton
Label="Upload All"
SmallImageSource="{StaticResource CloudUpload}"
ToolTipTitle="Upload All"
ToolTipDescription="Upload all keys in this view to the server"
Command="{Binding ActiveResourceCollection.UploadCommand}"
CommandParameter="All" />
</ribbon:RibbonSplitButton>
<ribbon:RibbonSplitButton
Label="Download To Target"
LargeImageSource="{StaticResource CloudDownload}"
ToolTipTitle="Selected To Target"
ToolTipDescription="Attempt to translate all selected keys"
Command="{Binding ActiveResourceCollection.DownloadLatestCommand}"
CommandParameter="Selected"
IsEnabled="{Binding Path=ActiveResourceCollection.HasTranslationServiceLocale, FallbackValue=False}">
<ribbon:RibbonButton
Label="All"
SmallImageSource="{StaticResource CloudDownload}"
ToolTipTitle="All To Target"
ToolTipDescription="Attempt to translate all keys and overwrite any existing values on target"
Command="{Binding ActiveResourceCollection.DownloadLatestCommand}"
CommandParameter="All" />
<ribbon:RibbonButton
Label="Empty"
SmallImageSource="{StaticResource CloudDownload}"
ToolTipTitle="Empty To Target"
ToolTipDescription="Attempt to translate all empty keys"
Command="{Binding ActiveResourceCollection.DownloadLatestCommand}"
CommandParameter="Empty" />
</ribbon:RibbonSplitButton>
</ribbon:RibbonGroup>
<ribbon:RibbonGroup x:Name="PackSave" Header="Save Languagepack">
<ribbon:RibbonButton
Label="Save"
LargeImageSource="{StaticResource SaveFileDialogControl}"
ToolTipTitle="Save Current Item's Pack"
ToolTipDescription="More info"
Command="{Binding Path=SavePackCommand}"
/>
</ribbon:RibbonGroup>
</ribbon:RibbonTab>
</ribbon:Ribbon>
<ComboBox Grid.Row="1" Margin="10" Padding="6" ItemsSource="{Binding ProjectSettings.InstalledPackages}" SelectedItem="{Binding SelectedPackage}" MinWidth="500" HorizontalAlignment="Stretch">
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding FriendlyName}" TextAlignment="Left" TextWrapping="Wrap" Width="400" />
<TextBlock Text="{Binding Version}" TextAlignment="Left" TextWrapping="Wrap" Width="100" />
<TextBlock Text="{Binding FolderName}" TextAlignment="Left" TextWrapping="Wrap" Width="300" />
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TreeView Grid.Column="0" Name="ResourceTree" ItemsSource="{Binding TreeContent}">
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="FontWeight" Value="Normal" />
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="FontWeight" Value="Bold" />
</Trigger>
</Style.Triggers>
</Style>
</TreeView.ItemContainerStyle>
<TreeView.Resources>
<HierarchicalDataTemplate ItemsSource="{Binding Children}" DataType="{x:Type vm:TreeViewItemViewModel}">
<StackPanel Orientation="Horizontal" Height="20">
<Image Width="16" Height="16"
Margin="4,0" Source="{Binding Path=Image}" />
<TextBlock Text="{Binding Path=Name}" Margin="6,0,0,0">
<TextBlock.ContextMenu>
<ContextMenu ItemsSource="{Binding Path=CommandList}">
<ContextMenu.ItemTemplate>
<DataTemplate>
<MenuItem Header="{Binding DisplayName}" Command="{Binding Command}" CommandParameter="{Binding CommandParameter}"/>
</DataTemplate>
</ContextMenu.ItemTemplate>
</ContextMenu>
</TextBlock.ContextMenu>
<TextBlock.InputBindings>
<MouseBinding Gesture="LeftDoubleClick" Command="{Binding Command}" CommandParameter="{Binding Key}" />
</TextBlock.InputBindings>
</TextBlock>
</StackPanel>
</HierarchicalDataTemplate>
</TreeView.Resources>
</TreeView>
<GridSplitter Grid.Column="1" Name="GridSplitter1" HorizontalAlignment="Center" VerticalAlignment="Stretch" Background="#aaa" Width="3" ShowsPreview="False" />
<ContentControl Grid.Column="2"
Content="{Binding Path=Workspaces}"
ContentTemplate="{StaticResource WorkspacesTemplate}"
/>
</Grid>
<StatusBar Grid.Row="3">
<TextBlock Text="{Binding MainStatus}" />
<Separator />
<TextBlock Text="{Binding ProjectSettings.DotNetNukeType}" />
<TextBlock Text="{Binding ProjectSettings.DotNetNukeVersion}" />
<Separator />
<TextBlock Text="Target Locale: " />
<TextBlock Text="{Binding SelectedLocale.EnglishName}" />
</StatusBar>
<Border BorderBrush="Black" BorderThickness="1" Background="#80000000" Visibility="{Binding IsBusy, Converter={StaticResource boolConverter}}" Grid.RowSpan="3">
<Grid>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Margin="0" TextWrapping="Wrap" Text="Please Wait..." FontSize="24" FontWeight="Bold" Foreground="#7EFFFFFF"/>
<TextBlock Margin="0" TextWrapping="Wrap" Text="" FontSize="18" FontWeight="Normal" Foreground="#7EFFFFFF"/>
</StackPanel>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Margin="0" TextWrapping="Wrap" Text="" FontSize="24" FontWeight="Bold" Foreground="#7EFFFFFF"/>
<TextBlock Margin="0" TextWrapping="Wrap" Text="{Binding BusyMessage}" FontSize="18" FontWeight="Normal" Foreground="#7EFFFFFF"/>
</StackPanel>
</Grid>
</Border>
</Grid>
</ribbon:RibbonWindow>