summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/OptionsView.xaml
blob: 88f2fae61f0f0af3e96510003b17b6cc82e68f17 (plain)
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
<UserControl  x:Class="HandBrakeWPF.Views.OptionsView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cal="http://www.caliburnproject.org"
        xmlns:Helpers="clr-namespace:HandBrakeWPF.Helpers"
              xmlns:Options="clr-namespace:HandBrakeWPF.Converters.Options"
              xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
              xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" Background="White">

    <UserControl.Resources>
        <Style TargetType="Button">
            <Setter Property="FontWeight" Value="Bold" />
            <Setter Property="Padding" Value="5,0.5" />
            <Setter Property="FontSize" Value="11.5" />
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>

        <Style TargetType="TextBlock">
            <Setter Property="Margin" Value="0,0,5,0" />
        </Style>

        <Style TargetType="CheckBox">
            <Setter Property="Margin" Value="0,0,0,5" />
        </Style>

        <Style TargetType="ListBoxItem">
            <Setter Property="Padding" Value="8,4" />
            <!--<Style.Triggers>
                <DataTrigger Binding="{Binding IsBuildIn}" Value="True">
                    <Setter Property="Foreground" Value="DarkBlue" />
                </DataTrigger>
            </Style.Triggers>-->
        </Style>

        <Options:OptionsTabConverter x:Key="tabConverter" />
        <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
    </UserControl.Resources>

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>


        <StackPanel Orientation="Vertical" Grid.Column="0" Margin="10,10,0,0">
            <Border BorderThickness="0 0 0 1" BorderBrush="LightGray" Margin="0,0,0,10">
                <TextBlock Text="Preferences" FontSize="16" />
            </Border>

            <ListBox ItemsSource="{Binding OptionTabs}" SelectedItem="{Binding SelectedTab}"
                     BorderThickness="0" Background="Transparent">
            </ListBox>

        </StackPanel>

        <ScrollViewer Grid.Column="1">
            <StackPanel Orientation="Vertical">

                <StackPanel Name="General" Orientation="Vertical" Margin="10,10,0,0"
                            Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter='General'}">

                    <Border BorderThickness="0 0 0 1" BorderBrush="LightGray">
                        <TextBlock Text="General" FontSize="16" />
                    </Border>

                    <StackPanel Orientation="Vertical" Margin="0,10,0,20">

                        <TextBlock Text="On Startup" Grid.Column="0" FontSize="14" Margin="0,0,0,10"/>

                        <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">
                            <CheckBox Content="Check for Updates" IsChecked="{Binding CheckForUpdates}" />
                            <ComboBox Name="checkForUpdateFrequency" ItemsSource="{Binding CheckForUpdatesFrequencies}" SelectedIndex="{Binding CheckForUpdatesFrequency}" Margin="25,0,0,5" HorizontalAlignment="Left" Width="120"></ComboBox>

                            <CheckBox Content="Enable Tooltips"  Visibility="Collapsed"  IsChecked="{Binding EnableGuiTooltips}" />
                        </StackPanel>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Margin="0,0,0,20">
                        <TextBlock Text="When Done" Grid.Column="0" FontSize="14" Margin="0,0,0,10" />

                        <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">
                            <ComboBox Name="whenDone" ItemsSource="{Binding WhenDoneOptions}" SelectedItem="{Binding WhenDone}" Width="120"  HorizontalAlignment="Left"></ComboBox>

                            <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
                                <CheckBox Content="Growl after Queue Completes" IsChecked="{Binding GrowlAfterEncode}" Margin="0,0,5,0"/>
                                <CheckBox Content="Growl after Encode Completes" IsChecked="{Binding GrowlAfterQueue}" />
                            </StackPanel>

                            <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
                                <CheckBox Content="Send file to:" VerticalAlignment="Center" IsChecked="{Binding SendFileAfterEncode}" />
                                <TextBlock Margin="5,0,5,5" VerticalAlignment="Center" Text="{Binding SendFileTo}" />
                                <Button Content="Browse" cal:Message.Attach="[Event Click] = [Action BrowseSendFileTo]" Width="55"/>
                            </StackPanel>

                            <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
                                <TextBlock VerticalAlignment="Center"  Margin="25,0,5,0" Text="Arguments:" />
                                <TextBox Name="SendToArguments" Text="{Binding Arguments}" Width="250" />
                            </StackPanel>

                        </StackPanel>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Margin="0,0,0,20">

                        <TextBlock Text="Path to VLC Player" Grid.Column="0" FontSize="14" Margin="0,0,0,10"/>

                        <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">

                            <StackPanel Orientation="Horizontal">
                                <TextBlock VerticalAlignment="Center" Text="Path:" />
                                <TextBox Name="vlcPath" Text="{Binding VLCPath}"  Width="250" />
                                <Button Content="Browse" cal:Message.Attach="[Event Click] = [Action BrowseVlcPath]" Margin="5,0,0,0" Width="55"/>
                            </StackPanel>
                            <TextBlock Margin="30,0,0,0" Text="This path is used for the video preview feature only." />

                        </StackPanel>
                    </StackPanel>
                </StackPanel>

                <StackPanel Name="Output" Orientation="Vertical" Margin="10,10,0,0"
                            Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter='Output Files'}">

                    <Border BorderThickness="0 0 0 1" BorderBrush="LightGray">
                        <TextBlock Text="Output Files" FontSize="16" />
                    </Border>

                    <StackPanel Orientation="Vertical" Margin="0,10,0,20">

                        <TextBlock Text="Automatic File Naming" Grid.Column="0" FontSize="14" Margin="0,0,0,10"/>

                        <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">
                            <CheckBox Content="Automatically name output files" IsChecked="{Binding AutomaticallyNameFiles}" />

                            <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
                                <TextBlock VerticalAlignment="Center" Text="Default Path: " />
                                <TextBox Name="autoNameOutputPath" Text="{Binding AutoNameDefaultPath}" Width="180" />
                                <Button Content="Browse" Margin="5,0,0,0" cal:Message.Attach="[Event Click] = [Action BrowseAutoNamePath]" Width="55"/>
                            </StackPanel>
                            <TextBlock Text="Available Options: {source_path} or {source_folder_name} (Not Both)" />

                            <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                                <TextBlock VerticalAlignment="Center" Text="Format:" />
                                <TextBox Name="autoNameFormat" Text="{Binding AutonameFormat}" Width="180" ToolTip=" {Source} = Source Name,  {Title} = Title Number,  {Chapters} = Selected Chapters, {Date} = Todays Date,"  />
                            </StackPanel>
                            <TextBlock Text="Available Options: {source} {title} {chapters} {date}" />

                            <StackPanel Orientation="Horizontal" Margin="0,15,0,0">
                                <CheckBox Content="Remove underscores from name" IsChecked="{Binding RemoveUnderscores}"/>
                                <CheckBox Content="Change case to Title Case" IsChecked="{Binding ChangeToTitleCase}" Margin="5,0,0,0" />
                            </StackPanel>

                            <StackPanel Orientation="Horizontal" Margin="0,15,0,0">
                                <TextBlock VerticalAlignment="Center" Text="MP4 File Extension:" />
                                <ComboBox Name="mp4FileExtension" Width="120" ItemsSource="{Binding Mp4ExtensionOptions}" SelectedIndex="{Binding SelectedMp4Extension}" HorizontalAlignment="Left"></ComboBox>
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>

                <StackPanel Name="Audio" Orientation="Vertical" Margin="10,10,0,0"
                            Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter='Language'}">

                    <Border BorderThickness="0 0 0 1" BorderBrush="LightGray">
                        <TextBlock Text="Audio and Subtitle Language Handling" FontSize="16" />
                    </Border>

                    <TextBlock Text="Select your preferred language" Grid.Column="0" Margin="10,10,0,0" FontSize="14"/>

                    <Grid Margin="20,10,0,0" >
                        <StackPanel Orientation="Horizontal">
                            <TextBlock VerticalAlignment="Center"  Text="Audio: " FontSize="10" />
                            <ComboBox Name="primaryAudioLanguage" VerticalAlignment="Center"  ItemsSource="{Binding PreferredLanguages}" SelectedItem="{Binding SelectedPreferredLangauge}" Width="120" />
                            <TextBlock VerticalAlignment="Center"  Text="Subtitles: " FontSize="10" Margin="10,0,0,0" />
                            <ComboBox Name="primarySubtitleLanguage" VerticalAlignment="Center"  ItemsSource="{Binding PreferredLanguages}" SelectedItem="{Binding SelectedPreferredSubtitleLangauge}" Width="120" />
                        </StackPanel>
                    </Grid>

                    <TextBlock Text="Select languages for automatic inclusion" Grid.Column="0" Margin="10,20,0,0" FontSize="14"/>

                    <Grid Margin="20,10,0,0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <StackPanel Orientation="Horizontal">
                            <Grid Margin="10,0,0,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>

                                <StackPanel Orientation="Vertical" Grid.Column="0">
                                    <TextBlock Text="Available Languages" Margin="0,0,0,5"/>
                                    <ListBox Name="availableLanguages" ItemsSource="{Binding AvailableLanguages}" Helpers:ListBoxHelper.SelectedItems="{Binding SelectedAvailableToMove}" 
                                             SelectionMode="Extended" Width="140" Height="140"></ListBox>
                                </StackPanel>

                                <DockPanel Grid.Column="1" Margin="10,0,10,0">
                                    <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                                        <Button Content="Move Left"  VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveLeft]" Width="80" />
                                        <Button Content="Move Right"  VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveRight]" Width="80" />
                                        <Button Content="Clear" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageClearAll]" Width="80"/>
                                    </StackPanel>
                                </DockPanel>

                                <StackPanel Orientation="Vertical" Grid.Column="2">
                                    <TextBlock Text="Selected Languages"  Margin="0,0,0,5"/>
                                    <ListBox Name="selectedLangauges" ItemsSource="{Binding SelectedLangauges}" Helpers:ListBoxHelper.SelectedItems="{Binding SelectedLangaugesToMove}" 
                                             SelectionMode="Extended" Width="140" Height="140"
                                             dd:DragDrop.DropHandler="{Binding}"
                                             dd:DragDrop.IsDragSource="True"
                                             dd:DragDrop.IsDropTarget="True"/>
                                </StackPanel>
                            </Grid>
                        </StackPanel>
                    </Grid>

                    <GroupBox Header="What to do (Automatically Add Tracks)" Margin="20,5,10,0" >
                        <StackPanel Orientation="Vertical" Margin="0,5,0,5">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="Audio:" VerticalAlignment="Center" Margin="15,0,5,0" Width="100" />
                                <ComboBox Name="autoAudioMode" ItemsSource="{Binding AddAudioModeOptions}" SelectedIndex="{Binding SelectedAddAudioMode}" Width="120" Margin="0,0,5,0" />
                                <CheckBox Content="Add only one audio track per language" VerticalAlignment="Center" IsChecked="{Binding AddOnlyOneAudioTrackPerLanguage}" />
                            </StackPanel>

                            <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
                                <TextBlock Text="Subtitle:" VerticalAlignment="Center" Margin="15,0,5,0" Width="100" />
                                <ComboBox Name="autoSubtitleMode" ItemsSource="{Binding AddSubtitleModeOptions}" SelectedIndex="{Binding SelectedAddSubtitleMode}" Width="120" Margin="0,0,5,0" />
                            </StackPanel>

                            <CheckBox Content="Add Closed Captions when available" Margin="120,5,0,0" IsChecked="{Binding AddClosedCaptions}"/>
                        </StackPanel>
                    </GroupBox>

                    <StackPanel Orientation="Vertical" Margin="0,10,0,0">
                        <Label Content="Audio Tab Options" FontSize="14"/>
                        <CheckBox IsChecked="{Binding ShowAdvancedPassthruOpts}" Content="Show advanced audio passthru options. (Requires Restart)"
                                  Margin="20,0,0,0" />
                    </StackPanel>

                </StackPanel>

                <StackPanel Name="Advanced" Orientation="Vertical" Margin="10,10,0,0"
                            Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter='Advanced'}">

                    <Border BorderThickness="0 0 0 1" BorderBrush="LightGray">
                        <TextBlock Text="Advanced" FontSize="16" />
                    </Border>

                    <StackPanel Orientation="Vertical" Margin="0,10,0,20">

                        <TextBlock Text="Advanced Options" Grid.Column="0" FontSize="14" Margin="0,0,0,10"/>

                        <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">
                            <CheckBox Content="Prevent the system from sleeping while encoding" IsChecked="{Binding PreventSleep}" />
                            <CheckBox Content="Minimize to system tray (Requires Restart)" Visibility="Collapsed" IsChecked="{Binding MinimiseToTray}" />
                            <CheckBox Content="Display status messages from tray icon (balloon popups)"  Visibility="Collapsed"  IsChecked="{Binding DisplayStatusMessagesTrayIcon}" />
                            <CheckBox Content="Disable built-in preset update notification" IsChecked="{Binding DisablePresetUpdateCheckNotification}" />
                            <CheckBox Content="Always clear completed queue items after an encode completes" IsChecked="{Binding ClearQueueOnEncodeCompleted}" />
                            <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                                <TextBlock Text="Number of picture previews to scan:" VerticalAlignment="Center" Width="250" />
                                <ComboBox Name="numberOfPreviews" ItemsSource="{Binding PreviewPicturesToScan}" SelectedItem="{Binding SelectedPreviewCount}" Width="120" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
                                <TextBlock Text="Minimum length of title to scan (seconds):" VerticalAlignment="Center" Width="250" />
                                <TextBox Name="MinTitleLength" Text="{Binding MinLength}"  Width="120"/>
                                <!-- Find a control for this-->
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
                                <TextBlock Text="Priority Level:" Width="250" VerticalAlignment="Center" />
                                <ComboBox Name="processPriorityLevel" ItemsSource="{Binding PriorityLevelOptions}" SelectedItem="{Binding SelectedPriority}" Width="120" />
                            </StackPanel>

                        </StackPanel>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Margin="0,10,0,20">
                        <TextBlock Text="x264 Settings" Grid.Column="0" FontSize="14" Margin="0,0,0,10"/>
                        <StackPanel Orientation="Horizontal" Grid.Column="1"  Margin="20,0,0,0">
                            <TextBlock Text="Constant quality fractional granularity:" VerticalAlignment="Center" Width="250" />
                            <ComboBox Name="x264Granularity" ItemsSource="{Binding ConstantQualityGranularity}" SelectedItem="{Binding SelectedGranulairty}" Width="120"/>
                        </StackPanel>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Margin="0,10,0,20">

                        <TextBlock Text="DVD Reading" Grid.Column="0" FontSize="14" Margin="0,0,0,10"/>

                        <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">
                            <CheckBox Content="Disable LibDVDNav. (libdvdread will be used instead)" IsChecked="{Binding DisableLibdvdNav}" />
                        </StackPanel>

                    </StackPanel>

                    <StackPanel Orientation="Vertical" Margin="0,10,0,20">

                        <TextBlock Text="Logging" Grid.Column="0" FontSize="14" Margin="0,0,0,10"/>

                        <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">
                            <StackPanel Orientation="Horizontal" Grid.Column="1">
                                <TextBlock Text="Log Verbosity Level:" Width="250" VerticalAlignment="Center" />
                                <ComboBox Name="logVerbosityLevel" ItemsSource="{Binding LogVerbosityOptions}" SelectedItem="{Binding SelectedVerbosity}" Width="120" />
                            </StackPanel>

                            <CheckBox Content="Put a copy of individual encode logs in the same location as the encoded video" Margin="0,5,0,0" IsChecked="{Binding CopyLogToEncodeDirectory}" />
                            <CheckBox Content="Put a copy of individual encode logs in a specified location: " Margin="0,5,0,0" IsChecked="{Binding CopyLogToSepcficedLocation}" />
                            <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Grid.Column="1">
                                <TextBlock Text="Log Path:" VerticalAlignment="Center" />
                                <TextBox Width="120" Text="{Binding LogDirectory}" />
                                <Button Content="Browse" Margin="5,0,0,0" cal:Message.Attach="[Event Click] = [Action BrowseLogPath]" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Grid.Column="1">
                                <Button Content="View Log Directory" cal:Message.Attach="[Event Click] = [Action ViewLogDirectory]" Margin="0,0,5,0" />
                                <Button Content="Clear Log History" cal:Message.Attach="[Event Click] = [Action ClearLogHistory]" />
                            </StackPanel>

                            <CheckBox Content="Clear Log files older than 30 days " Margin="0,5,0,0" IsChecked="{Binding ClearOldOlgs}" />
                        </StackPanel>

                    </StackPanel>


                    <StackPanel Orientation="Vertical" Margin="0,10,0,20">

                        <TextBlock Text="Experimental Features" Grid.Column="0" FontSize="14" Margin="0,0,0,10"/>
                        
                        <TextBlock Text="These options are for developer testing of features that are currently in progress!!!!" FontWeight="Bold" Margin="0,0,0,10" />

                        <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">
                            
                            <CheckBox Content="Enable LibHB (uses hb.dll instead of HandBrakeCLI.exe)" Margin="0,5,0,0" IsChecked="{Binding EnableLibHb}" />
                            <CheckBox Content="Enable Process Isolation (Run Scans and Encodes via an intermediate service)" Margin="20,10,0,0" IsChecked="{Binding EnableProcessIsolation}" />
                            <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Grid.Column="1">
                                <TextBlock Text="Server Port:" VerticalAlignment="Center" />
                                <TextBox Width="50" MaxLength="5" Text="{Binding ServerPort}" />
                            </StackPanel>

                            <CheckBox Content="Enable Debug Features" IsChecked="{Binding EnableDebugFeatures}" Margin="0,10,0,0" />
                        </StackPanel>
                    </StackPanel>
                </StackPanel>

                <StackPanel Name="Updates" Orientation="Vertical" Margin="10,10,0,0"
                            Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter='Updates'}">


                    <Border BorderThickness="0 0 0 1" BorderBrush="LightGray">
                        <TextBlock Text="Updates" FontSize="16" />
                    </Border>

                    <TextBlock Text="Current Version" Grid.Column="0" FontSize="14" Margin="0,10,0,10"/>

                    <Grid Margin="20,10,0,20">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="70" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <!-- Version -->
                        <TextBlock Grid.Column="0" Margin="0,0,5,0" Text="Version:" />
                        <TextBlock Grid.Column="1" Margin="0,0,0,1" VerticalAlignment="Bottom" Text="{Binding Version}" />
                    </Grid>

                    <TextBlock Text="Updates" Grid.Column="0" FontSize="14" Margin="0,10,0,10"/>

                    <StackPanel Margin="20,0,0,0" Orientation="Horizontal">
                        <Button Content="Check for Updates" Width="120" Margin="0,0,5,0" cal:Message.Attach="[Event Click] = [Action PerformUpdateCheck]" />
                        <Button Content="Download Update" Width="120" cal:Message.Attach="[Event Click] = [Action DownloadUpdate]" Visibility="{Binding UpdateAvailable, Converter={StaticResource boolToVisConverter}}" />
                    </StackPanel>
                    
                    <StackPanel Margin="20,10,0,0" Orientation="Horizontal">
                        <ProgressBar Minimum="0" Maximum="100" Height="20" Width="400" Value="{Binding DownloadProgressPercentage}" 
                                 Visibility="{Binding UpdateAvailable, Converter={StaticResource boolToVisConverter}}" />
                        <TextBlock Text="{Binding UpdateMessage}" Margin="10,0,10,0" VerticalAlignment="Center" />
                    </StackPanel>

                </StackPanel>
            </StackPanel>
        </ScrollViewer>

        <StackPanel HorizontalAlignment="Stretch" Background="LightGray" Grid.Row="1" Grid.ColumnSpan="2" >
            <Button Content="Close" IsDefault="True" cal:Message.Attach="[Event Click] = [Action Close]"
                    HorizontalAlignment="Center" Padding="12,2" Margin="0,5,10,5" />
        </StackPanel>


    </Grid>
</UserControl>