PageRenderTime 29ms CodeModel.GetById 15ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 1ms

/Application/GUI/Controls/ControlPanel.xaml

http://yet-another-music-application.googlecode.com/
XAML | 600 lines | 507 code | 60 blank | 33 comment | 0 complexity | e3f9837ded860fa1bfca694f15f3e4d2 MD5 | raw file
  1<!--ControlPanel.xaml
  2	
  3	The "Control Panel" screen used to show all the preferences
  4	of Stoffi.
  5	
  6	= = = = = = = = = =
  7	
  8	This code is part of the Stoffi Music Player Project.
  9	Visit our website at: stoffiplayer.com
 10	
 11	This program is free software; you can redistribute it and/or
 12	modify it under the terms of the GNU General Public License
 13	as published by the Free Software Foundation; either version
 14	3 of the License, or (at your option) any later version.
 15	
 16	See stoffiplayer.com/license for more information.
 17	-->
 18<UserControl x:Class="Stoffi.ControlPanel"
 19			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 20			 xmlns:loc="http://schemas.tomer.com/winfx/2006/xaml/presentation"
 21			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 22			 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
 23			 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 24			 xmlns:Stoffi="clr-namespace:Stoffi"
 25			 mc:Ignorable="d"
 26			 Loaded="ControlPanel_Loaded"
 27			 Initialized="ControlPanel_Initialized"
 28			 PreviewKeyDown="ControlPanel_KeyDown"
 29			 PreviewKeyUp="ControlPanel_KeyUp"
 30			 SizeChanged="ControlPanel_SizeChanged"
 31			 TextOptions.TextFormattingMode="Display"
 32			 d:DesignHeight="600" d:DesignWidth="900">
 33	<UserControl.Resources>
 34		<ResourceDictionary>
 35			<ResourceDictionary.MergedDictionaries>
 36				<ResourceDictionary Source="..\Styles.xaml"/>
 37				<ResourceDictionary Source="..\..\Resources\DescriptionConverters.xaml"/>
 38			</ResourceDictionary.MergedDictionaries>
 39		</ResourceDictionary>
 40	</UserControl.Resources>
 41
 42	<DockPanel Background="#e7f1fd" DockPanel.Dock="Top" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="ControlPanelMain">
 43		<Grid DockPanel.Dock="Top" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
 44			<Grid.ColumnDefinitions>
 45				<ColumnDefinition Width="200"/>
 46				<ColumnDefinition Width="*"/>
 47			</Grid.ColumnDefinitions>
 48
 49			<DockPanel Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="ControlPanelLeft">
 50				<Button DockPanel.Dock="Top" 
 51						Margin="10 13 0 0" 
 52						Style="{StaticResource ControlPanelLinkStyle}" 
 53						Click="Back_Clicked"
 54						loc:Translate.Uid="ControlBack"
 55						Content="{loc:Translate Content}"/>
 56				<Button x:Name="ControlPanelLink_General" 
 57						DockPanel.Dock="Top" 
 58						Margin="10 20 0 0" 
 59						Style="{StaticResource ControlPanelLinkStyle}" 
 60						Click="General_Clicked"
 61						loc:Translate.Uid="ControlGeneral"
 62						Content="{loc:Translate Content}"/>
 63				<Button x:Name="ControlPanelLink_Sources" 
 64						DockPanel.Dock="Top" Margin="10 5 0 0"  
 65						Style="{StaticResource ControlPanelLinkStyle}" 
 66						Click="Sources_Clicked"
 67						loc:Translate.Uid="ControlSources"
 68						Content="{loc:Translate Content}"/>
 69				<Button x:Name="ControlPanelLink_Services" 
 70						DockPanel.Dock="Top" Margin="10 5 0 0"  
 71						Style="{StaticResource ControlPanelLinkStyle}" 
 72						Click="Services_Clicked"
 73						loc:Translate.Uid="ControlServices"
 74						Content="{loc:Translate Content}"/>
 75				<Button x:Name="ControlPanelLink_Shortcuts" 
 76						DockPanel.Dock="Top" Margin="10 5 0 0"  
 77						Style="{StaticResource ControlPanelLinkStyle}" 
 78						Click="Shortcuts_Clicked"
 79						loc:Translate.Uid="ControlShortcuts"
 80						Content="{loc:Translate Content}"/>
 81				<Button x:Name="ControlPanelLink_About"
 82						DockPanel.Dock="Top" 
 83						Margin="10 20 0 0" 
 84						Style="{StaticResource ControlPanelLinkStyle}" 
 85						Click="About_Clicked"
 86						loc:Translate.Uid="ControlAbout"
 87						Content="{loc:Translate Content}"/>
 88
 89				<Button DockPanel.Dock="Bottom" 
 90						Margin="10 5 0 20" 
 91						Style="{StaticResource ControlPanelLinkStyle}" 
 92						Click="Project_Clicked"
 93						loc:Translate.Uid="ControlProject"
 94						Content="{loc:Translate Content}"/>
 95				<Button DockPanel.Dock="Bottom" 
 96						Margin="10 5 0 0" 
 97						Style="{StaticResource ControlPanelLinkStyle}" 
 98						Click="Blog_Clicked"
 99						loc:Translate.Uid="ControlBlog"
100						Content="{loc:Translate Content}"/>
101				<Button DockPanel.Dock="Bottom" 
102						Margin="10 5 0 0" 
103						Style="{StaticResource ControlPanelLinkStyle}" 
104						Click="Website_Clicked"
105						loc:Translate.Uid="ControlWebsite"
106						Content="{loc:Translate Content}"/>
107				<TextBlock DockPanel.Dock="Bottom" 
108						   Padding="28 5 0 0" 
109						   loc:Translate.Uid="ControlSeeAlso"
110						   Text="{loc:Translate Text}"
111						   Foreground="#808080" 
112						   VerticalAlignment="Bottom"/>
113				<DockPanel.Background>
114					<ImageBrush ImageSource="/GUI/Images/Backgrounds/ControlLeft.png" Stretch="None" AlignmentY="Top"/>
115				</DockPanel.Background>
116			</DockPanel>
117
118
119			<!-- Tab: Sources -->
120			<ScrollViewer x:Name="ControlPanelSources" Visibility="Collapsed" Grid.Column="1" VerticalScrollBarVisibility="Auto">
121				<DockPanel Background="White" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" LastChildFill="True">
122					<TextBlock DockPanel.Dock="Top" 
123							   Style="{DynamicResource AeroControlPanelTitleStyle}" 
124							   x:Name="SourceTitle" 
125							   loc:Translate.Uid="SourcesTitle"
126							   Text="{loc:Translate Text}"/>
127
128
129					<!-- SOURCES -->
130					<DockPanel DockPanel.Dock="Top" Margin="25 15 0 5" LastChildFill="True">
131						<TextBlock loc:Translate.Uid="SourcesSubTitle" Text="{loc:Translate Text}" DockPanel.Dock="Left"/>
132						<Separator Background="#CCCCCC" Height="2" Margin="5 0 5 0" SnapsToDevicePixels="True" />
133					</DockPanel>
134
135					<DockPanel Margin="50 5 20 20" DockPanel.Dock="Top" LastChildFill="True">
136						<TextBlock Margin="5" TextWrapping="Wrap" DockPanel.Dock="Top" loc:Translate.Uid="SourcesText" Text="{loc:Translate Text}"/>
137						<StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
138							<Button Padding="10 1" 
139									HorizontalAlignment="Center" 
140									Margin="5" 
141									x:Name="AddFolder" 
142									Click="AddFolder_Clicked" 
143									loc:Translate.Uid="SourcesAddFolder" 
144									Content="{loc:Translate Content}"/>
145							<Button Padding="10 1" 
146									HorizontalAlignment="Center" 
147									Margin="5" 
148									x:Name="AddFile" 
149									Click="AddFile_Clicked"
150									loc:Translate.Uid="SourcesAddFile" 
151									Content="{loc:Translate Content}"/>
152							<Button Padding="10 1" 
153									HorizontalAlignment="Center" 
154									Margin="5" 
155									x:Name="IgnoreFolder" 
156									Click="IgnoreFolder_Clicked"
157									loc:Translate.Uid="SourcesIgnoreFolder" 
158									Content="{loc:Translate Content}"/>
159							<Button Padding="10 1" 
160									HorizontalAlignment="Center" 
161									Margin="5" 
162									x:Name="IgnoreFile" 
163									Click="IgnoreFile_Clicked"
164									loc:Translate.Uid="SourcesIgnoreFile" 
165									Content="{loc:Translate Content}"/>
166						</StackPanel>
167						<Stoffi:ViewDetails Margin="5" x:Name="SourceList" DockPanel.Dock="Top" KeyDown="SourceList_KeyDown" ContextMenuOpening="SourceList_ContextMenuOpening"/>
168
169					</DockPanel>
170
171				</DockPanel>
172			</ScrollViewer>
173
174			<!-- Tab: Keyboard Shortcuts -->
175			<ScrollViewer x:Name="ControlPanelShortcuts" Visibility="Collapsed" Grid.Column="1" VerticalScrollBarVisibility="Auto">
176				<DockPanel Background="White" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="ShortcutContainer">
177					<TextBlock DockPanel.Dock="Top" 
178							   Style="{DynamicResource AeroControlPanelTitleStyle}" 
179							   x:Name="ShortcutTitle" 
180							   loc:Translate.Uid="ShortcutsTitle" 
181							   Text="{loc:Translate Text}"/>
182
183
184					<!-- PROFILES -->
185					<DockPanel DockPanel.Dock="Top" Margin="25 15 0 5" LastChildFill="True">
186						<TextBlock loc:Translate.Uid="ShortcutsProfileTitle" Text="{loc:Translate Text}" DockPanel.Dock="Left"/>
187						<Separator Background="#CCCCCC" Height="2" Margin="5 0 5 0" SnapsToDevicePixels="True" />
188					</DockPanel>
189					<TextBlock Margin="50 5 0 5" TextWrapping="Wrap" DockPanel.Dock="Top" loc:Translate.Uid="ShortcutsProfileText" Text="{loc:Translate Text}"/>
190					<Grid DockPanel.Dock="Top" Margin="50 5 0 0">
191						<Grid.ColumnDefinitions>
192							<ColumnDefinition Width="170"/>
193							<ColumnDefinition Width="*"/>
194						</Grid.ColumnDefinitions>
195						<Grid.RowDefinitions>
196							<RowDefinition Height="Auto"/>
197							<RowDefinition Height="Auto"/>
198						</Grid.RowDefinitions>
199
200						<TextBlock Grid.Column="0" Grid.Row="0" loc:Translate.Uid="ShortcutsProfileSelect" Text="{loc:Translate Text}" VerticalAlignment="Center"/>
201
202						<ComboBox Grid.Column="1" Grid.Row="0" SelectedIndex="0" HorizontalAlignment="Left" x:Name="PrefShortcutProfile" Margin="0 5 15 5" SelectionChanged="PrefShortcutProfile_SelectionChanged">
203						</ComboBox>
204						
205						<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="1">
206							<Button x:Name="PrefCreateShortcutProfile" 
207									MinWidth="100" 
208									HorizontalAlignment="Left" 
209									Margin="0 5" 
210									loc:Translate.Uid="ShortcutsProfileNew" 
211									Content="{loc:Translate Content}"
212									Click="PrefCreateShortcutProfile_Clicked"/>
213							<Button x:Name="PrefRenameShortcutProfile" 
214									MinWidth="100" 
215									HorizontalAlignment="Left" 
216									Margin="10 5" 
217									loc:Translate.Uid="ShortcutsProfileRename" 
218									Content="{loc:Translate Content}"
219									Click="PrefRenameShortcutProfile_Clicked"/>
220							<Button x:Name="PrefDeleteShortcutProfile" 
221									MinWidth="100" 
222									HorizontalAlignment="Left" 
223									Margin="0 5" 
224									loc:Translate.Uid="ShortcutsProfileDelete" 
225									Content="{loc:Translate Content}"
226									Click="PrefDeleteShortcutProfile_Clicked"/>
227						</StackPanel>
228					</Grid>
229					
230					<DockPanel Name="ShortcutPanel" DockPanel.Dock="Top">
231						<!-- here all shortcuts will be inserted at runtime -->
232					</DockPanel>
233
234				</DockPanel>
235			</ScrollViewer>
236
237			<!-- Tab: About -->
238			<ScrollViewer x:Name="ControlPanelAbout" Visibility="Collapsed" Grid.Column="1" VerticalScrollBarVisibility="Auto">
239				<DockPanel Background="White" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
240					<TextBlock DockPanel.Dock="Top" 
241							   Style="{DynamicResource AeroControlPanelTitleStyle}" 
242							   x:Name="AboutTitle" 
243							   loc:Translate.Uid="AboutTitle" 
244							   Text="{loc:Translate Text}"/>
245				
246					<!-- DESCRIPTION -->
247					<DockPanel DockPanel.Dock="Top" Margin="25 15 0 5" LastChildFill="True">
248						<TextBlock loc:Translate.Uid="AboutDescriptionTitle" Text="{loc:Translate Text}" DockPanel.Dock="Left"/>
249						<Separator Background="#CCCCCC" Height="1" Margin="5 0 5 0" SnapsToDevicePixels="True" />
250					</DockPanel>
251					<Grid DockPanel.Dock="Top" Margin="50 5 20 0" HorizontalAlignment="Left">
252						<Grid.ColumnDefinitions>
253							<ColumnDefinition Width="*"/>
254							<ColumnDefinition Width="128"/>
255						</Grid.ColumnDefinitions>
256						<TextBlock Grid.Column="0" TextWrapping="Wrap" SnapsToDevicePixels="True" loc:Translate.Uid="AboutDescriptionText" Text="{loc:Translate Text}"/>
257						<Image Source="..\Images\Stoffi.png" Width="128" Height="128" Grid.Column="1"/>
258					</Grid>
259
260
261					<!-- PROPERTIES -->
262					<DockPanel DockPanel.Dock="Top" Margin="25 15 0 5" LastChildFill="True">
263						<TextBlock loc:Translate.Uid="AboutPropertiesTitle" Text="{loc:Translate Text}" DockPanel.Dock="Left"/>
264						<Separator Background="#CCCCCC" Height="1" Margin="5 0 5 0" SnapsToDevicePixels="True" />
265					</DockPanel>
266					<Grid DockPanel.Dock="Top" Margin="50 5 0 0">
267						<Grid.ColumnDefinitions>
268							<ColumnDefinition Width="190"/>
269							<ColumnDefinition Width="*"/>
270						</Grid.ColumnDefinitions>
271						<Grid.RowDefinitions>
272							<RowDefinition Height="Auto"/>
273							<RowDefinition Height="Auto"/>
274							<RowDefinition Height="Auto"/>
275							<RowDefinition Height="Auto"/>
276							<RowDefinition Height="Auto"/>
277							<RowDefinition Height="*"/>
278						</Grid.RowDefinitions>
279
280						<TextBlock Grid.Column="0" Grid.Row="0" loc:Translate.Uid="AboutPropertiesVersion" Text="{loc:Translate Text}" VerticalAlignment="Center" Margin="0 3"/>
281						<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="0" Margin="0">
282							<TextBox Text="N/A" x:Name="AboutVersion" IsReadOnly="true" BorderThickness="0" Padding="0" VerticalAlignment="Center" Margin="0 3"/>
283							<Expander loc:Translate.Uid="AboutPropertiesDetails" 
284									  Header="{loc:Translate Header}"
285									  Expanded="Details_Expanded" 
286									  Collapsed="Details_Collapsed" 
287									  VerticalAlignment="Center" 
288									  Margin="100 0 0 0"/>
289						</StackPanel>
290						<TextBlock	Grid.Column="0" Grid.Row="1" x:Name="AboutStampLabel"       Visibility="Collapsed" VerticalAlignment="Center" Margin="0 3" loc:Translate.Uid="AboutPropertiesStamp" Text="{loc:Translate Text}"/>
291						<TextBox	Grid.Column="1" Grid.Row="1" x:Name="AboutStamp"            Visibility="Collapsed" VerticalAlignment="Center" Margin="0 3" IsReadOnly="True" BorderThickness="0" Padding="0" Text="N/A"/>
292						<TextBlock	Grid.Column="0" Grid.Row="2" x:Name="AboutReleaseLabel"	    Visibility="Collapsed" VerticalAlignment="Center" Margin="0 3" loc:Translate.Uid="AboutPropertiesRelease" Text="{loc:Translate Text}"/>
293						<TextBox	Grid.Column="1" Grid.Row="2" x:Name="AboutRelease"          Visibility="Collapsed" VerticalAlignment="Center" Margin="0 3" IsReadOnly="True" BorderThickness="0" Padding="0" Text="N/A"/>
294						<TextBlock	Grid.Column="0" Grid.Row="3" x:Name="AboutArchLabel"        Visibility="Collapsed" VerticalAlignment="Center" Margin="0 3" loc:Translate.Uid="AboutPropertiesArch" Text="{loc:Translate Text}"/>
295						<TextBox	Grid.Column="1" Grid.Row="3" x:Name="AboutArch"             Visibility="Collapsed" VerticalAlignment="Center" Margin="0 3" IsReadOnly="True" BorderThickness="0" Padding="0" Text="N/A"/>
296						<TextBlock	Grid.Column="0" Grid.Row="4" x:Name="AboutChannelLabel"     Visibility="Collapsed" VerticalAlignment="Center" Margin="0 3" loc:Translate.Uid="AboutPropertiesChannel" Text="{loc:Translate Text}"/>
297						<TextBox	Grid.Column="1" Grid.Row="4" x:Name="AboutChannel"          Visibility="Collapsed" VerticalAlignment="Center" Margin="0 3" IsReadOnly="True" BorderThickness="0" Padding="0" Text="N/A"/>
298
299						<TextBlock Grid.Column="0" Grid.Row="5" loc:Translate.Uid="AboutPropertiesCheck" Text="{loc:Translate Text}" VerticalAlignment="Center" Margin="0 5"/>
300						<DockPanel Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" Margin="2 5">
301							<TextBlock DockPanel.Dock="Left" Text="N/A" x:Name="AboutUpgradeCheck"/>
302							<DockPanel DockPanel.Dock="Left" x:Name="AboutUpgradePending" Visibility="Collapsed">
303								<Image DockPanel.Dock="Left" VerticalAlignment="Top" Source="../Images/Icons/Upgrade.ico" Width="16" Height="16" Margin="20 0 5 0"/>
304								<TextBlock DockPanel.Dock="Left" loc:Translate.Uid="AboutPropertiesUpgraded" Text="{loc:Translate Text}"/>
305							</DockPanel>
306						</DockPanel>
307					</Grid>
308
309				
310					<!-- CREDITS -->
311					<DockPanel DockPanel.Dock="Top" Margin="25 20 0 5" LastChildFill="True">
312						<TextBlock Text="Credits" DockPanel.Dock="Left"/>
313						<Separator Background="#CCCCCC" Margin="5 0 5 0" SnapsToDevicePixels="True" />
314					</DockPanel>
315					<Grid DockPanel.Dock="Top" Margin="50 5 0 0">
316						<Grid.RowDefinitions>
317							<RowDefinition Height="20"/>
318							<RowDefinition Height="30"/>
319							<RowDefinition Height="20"/>
320							<RowDefinition Height="30"/>
321							<RowDefinition Height="20"/>
322							<RowDefinition Height="30"/>
323							<RowDefinition Height="20"/>
324							<RowDefinition Height="30"/>
325							<RowDefinition Height="20"/>
326							<RowDefinition Height="40"/>
327							<RowDefinition Height="20"/>
328							<RowDefinition Height="20"/>
329							<RowDefinition Height="20"/>
330						</Grid.RowDefinitions>
331
332						<TextBlock Grid.Row="0" Text="Christoffer Brodd-Reijer"/>
333						<TextBlock Grid.Row="1" loc:Translate.Uid="AboutCreditsChristoffer" Text="{loc:Translate Text}" FontStyle="Italic"/>
334						<TextBlock Grid.Row="2" Text="Mark Tibblin"/>
335						<TextBlock Grid.Row="3" loc:Translate.Uid="AboutCreditsMark" Text="{loc:Translate Text}" FontStyle="Italic"/>
336						<TextBlock Grid.Row="4" Text="Hylton Clarke"/>
337						<TextBlock Grid.Row="5" loc:Translate.Uid="AboutCreditsHylton" Text="{loc:Translate Text}" FontStyle="Italic"/>
338						<TextBlock Grid.Row="6" Text="Maggie Man"/>
339						<TextBlock Grid.Row="7" loc:Translate.Uid="AboutCreditsMaggie" Text="{loc:Translate Text}" FontStyle="Italic"/>
340						<TextBlock Grid.Row="8" Text="Tianwen Zhang"/>
341						<TextBlock Grid.Row="9" loc:Translate.Uid="AboutCreditsTianwen" Text="{loc:Translate Text}" FontStyle="Italic"/>
342						<TextBlock Grid.Row="10" loc:Translate.Uid="AboutCreditsTranslators" Text="{loc:Translate Text}"/>
343						<TextBlock Grid.Row="11" FontStyle="Italic" Text="Christoffer Brodd-Reijer"/>
344						<TextBlock Grid.Row="12" FontStyle="Italic" Text="Tianwen Zhang"/>
345					</Grid>
346				
347				
348				</DockPanel>
349			</ScrollViewer>
350
351			<!-- Tab: General -->
352			<ScrollViewer x:Name="ControlPanelGeneral" Visibility="Collapsed" Grid.Column="1" VerticalScrollBarVisibility="Auto">
353				<DockPanel Background="White" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
354					<TextBlock DockPanel.Dock="Top" 
355							   Style="{DynamicResource AeroControlPanelTitleStyle}" 
356							   x:Name="GeneralTitle" 
357							   loc:Translate.Uid="GeneralTitle" 
358							   Text="{loc:Translate Text}"/>
359
360
361					<!-- APPEARANCE -->
362					<DockPanel DockPanel.Dock="Top" Margin="25 15 0 5" LastChildFill="True">
363						<TextBlock loc:Translate.Uid="GeneralLookTitle" Text="{loc:Translate Text}" DockPanel.Dock="Left"/>
364						<Separator Background="#CCCCCC" Height="2" Margin="5 0 5 0" SnapsToDevicePixels="True" />
365					</DockPanel>
366					<TextBlock Margin="50 5 0 5" TextWrapping="Wrap" DockPanel.Dock="Top" loc:Translate.Uid="GeneralLookText" Text="{loc:Translate Text}"/>
367					<Grid DockPanel.Dock="Top" Margin="50 5 0 0">
368						<Grid.ColumnDefinitions>
369							<ColumnDefinition Width="Auto"/>
370							<ColumnDefinition Width="*"/>
371						</Grid.ColumnDefinitions>
372						<Grid.RowDefinitions>
373							<RowDefinition Height="Auto"/>
374							<RowDefinition Height="Auto"/>
375							<RowDefinition Height="Auto"/>
376							<RowDefinition Height="Auto"/>
377						</Grid.RowDefinitions>
378
379						<TextBlock Grid.Column="0" Grid.Row="0" loc:Translate.Uid="GeneralLanguage" Text="{loc:Translate Text}" VerticalAlignment="Center" Margin="0 0 10 0"/>
380						<ComboBox Grid.Column="1" Grid.Row="0" SelectedIndex="0" HorizontalAlignment="Left" x:Name="PrefLanguage" Margin="0 5">
381							<ComboBoxItem Tag="en-US">English (US)</ComboBoxItem>
382							<!--<ComboBoxItem Tag="pt-BR">Português (Brasil)</ComboBoxItem>-->
383							<ComboBoxItem Tag="zh-CN">简体中文</ComboBoxItem>
384							<ComboBoxItem Tag="sv-SE">Svenska</ComboBoxItem>
385						</ComboBox>
386
387						<TextBlock Grid.Column="0" Grid.Row="1" loc:Translate.Uid="GeneralOSD" Text="{loc:Translate Text}" Margin="0 5 10 5" />
388						<CheckBox x:Name="PrefOSD" Grid.Column="1" Grid.Row="1" Margin="0 5" IsChecked="{Binding ShowOSD}" />
389
390						<TextBlock Grid.Column="0" Grid.Row="2" loc:Translate.Uid="GeneralMinimize" Text="{loc:Translate Text}" Margin="0 5 10 5" />
391						<CheckBox x:Name="PrefMin2Tray" Grid.Column="1" Grid.Row="2" Margin="0 5" IsChecked="{Binding MinimizeToTray}" />
392					</Grid>
393
394
395					<!-- BEHAVIOUR -->
396					<DockPanel DockPanel.Dock="Top" Margin="25 15 0 5" LastChildFill="True">
397						<TextBlock loc:Translate.Uid="GeneralFeelTitle" Text="{loc:Translate Text}" DockPanel.Dock="Left"/>
398						<Separator Background="#CCCCCC" Height="2" Margin="5 0 5 0" SnapsToDevicePixels="True" />
399					</DockPanel>
400					<TextBlock Margin="50 5 0 5" TextWrapping="Wrap" DockPanel.Dock="Top" loc:Translate.Uid="GeneralFeelText" Text="{loc:Translate Text}"/>
401					<Grid DockPanel.Dock="Top" Margin="50 5 0 25">
402						<Grid.ColumnDefinitions>
403							<ColumnDefinition Width="170"/>
404							<ColumnDefinition Width="*"/>
405						</Grid.ColumnDefinitions>
406						<Grid.RowDefinitions>
407							<RowDefinition Height="Auto"/>
408							<RowDefinition Height="Auto"/>
409							<RowDefinition Height="Auto"/>
410							<RowDefinition Height="Auto"/>
411							<RowDefinition Height="Auto"/>
412							<RowDefinition Height="Auto"/>
413							<RowDefinition Height="Auto"/>
414							<RowDefinition Height="Auto"/>
415							<RowDefinition Height="Auto"/>
416							<RowDefinition Height="Auto"/>
417						</Grid.RowDefinitions>
418
419						<TextBlock Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" loc:Translate.Uid="GeneralSearchPolicy" Text="{loc:Translate Text}"/>
420						<ComboBox Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="0 5" x:Name="SearchPolicyCombo">
421							<ComboBoxItem loc:Translate.Uid="GeneralSearchPolicyGlobal" Content="{loc:Translate Content}"/>
422							<ComboBoxItem loc:Translate.Uid="GeneralSearchPolicyPartial" Content="{loc:Translate Content}"/>
423							<ComboBoxItem loc:Translate.Uid="GeneralSearchPolicyIndividual" Content="{loc:Translate Content}"/>
424						</ComboBox>
425
426						<TextBlock Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" loc:Translate.Uid="GeneralUpgradePolicy" Text="{loc:Translate Text}"/>
427						<DockPanel Grid.Column="1" Grid.Row="1" LastChildFill="false">
428							<ComboBox SelectedIndex="0" Margin="0 5" DockPanel.Dock="Left" x:Name="UpgradePolicyCombo">
429								<ComboBoxItem loc:Translate.Uid="GeneralUpgradePolicyAuto" Content="{loc:Translate Content}"/>
430								<ComboBoxItem loc:Translate.Uid="GeneralUpgradePolicyNotify" Content="{loc:Translate Content}"/>
431								<ComboBoxItem loc:Translate.Uid="GeneralUpgradePolicyManual" Content="{loc:Translate Content}"/>
432							</ComboBox>
433							<Button DockPanel.Dock="Left" 
434									VerticalAlignment="Center" 
435									Margin="5 0" 
436									x:Name="PrefDoUpgrade" 
437									Visibility="Collapsed" 
438									Click="PrefDoUpgrade_Clicked" 
439									loc:Translate.Uid="GeneralDoUpgrade" 
440									Content="{loc:Translate Text}"/>
441							<Button DockPanel.Dock="Left" 
442									VerticalAlignment="Center" 
443									Margin="5 0" 
444									x:Name="PrefCheckForUpgrades" 
445									Visibility="Collapsed" 
446									Click="CheckForUpgrades_Clicked" 
447									loc:Translate.Uid="GeneralDoCheck" 
448									Content="{loc:Translate Text}"/>
449							<Button DockPanel.Dock="Left" 
450									VerticalAlignment="Center" 
451									Margin="5 0" 
452									x:Name="Restart" 
453									Visibility="Collapsed" 
454									Click="Restart_Click"
455									loc:Translate.Uid="GeneralRestart" 
456									Content="{loc:Translate Text}"/>
457						</DockPanel>
458						<DockPanel Grid.Column="1" Grid.Row="2" x:Name="UpgradeProgress" Visibility="Collapsed">
459							<TextBlock DockPanel.Dock="Left" loc:Translate.Uid="UpgradeDownloading" Text="{loc:Translate Text}" Margin="15 0" x:Name="UpgradeProgressLabel"/>
460							<ProgressBar DockPanel.Dock="Left" Width="150" HorizontalAlignment="Left" Value="0" x:Name="UpgradeProgressBar"/>
461							<TextBlock DockPanel.Dock="Left" Text="0%" Margin="15 0" MaxWidth="300" TextWrapping="Wrap" x:Name="UpgradeProgressInfo" Visibility="Collapsed"/>
462						</DockPanel>
463						<Border Grid.Row="3" Grid.Column="1" Visibility="Collapsed" x:Name="UpgradeMessage"
464								Padding="10 3 10 4" BorderThickness="1" HorizontalAlignment="Left" SnapsToDevicePixels="True">
465							<StackPanel Orientation="Horizontal">
466								<Image x:Name="UpgradeMessageIcon" Source="../Images/Icons/Info.ico" Width="22" Height="22" Margin="0 0 5 0" VerticalAlignment="Center"/>
467								<TextBlock x:Name="UpgradeMessageText" Text="This is a message that is very long, long" VerticalAlignment="Center"/>
468								<Image x:Name="UpgradeMessageClose" Source="../Images/Buttons/Close.gif" MouseLeftButtonDown="UpgradeMessageClose_MouseLeftButtonDown"
469									   Width="8" Height="8" Margin="10 0 0 0" Cursor="Hand" VerticalAlignment="Center"/>
470							</StackPanel>
471						</Border>
472
473						<TextBlock Grid.Row="4" 
474								   Grid.Column="0" 
475								   VerticalAlignment="Top" 
476								   Margin="0 25 0 5" 
477								   Grid.ColumnSpan="2" 
478								   loc:Translate.Uid="GeneralAddPlayText" 
479								   Text="{loc:Translate Text}"/>
480
481						<TextBlock Grid.Row="5" Grid.Column="0" loc:Translate.Uid="GeneralAddPolicy" Text="{loc:Translate Text}" VerticalAlignment="Center"/>
482						<ComboBox Grid.Row="5" Grid.Column="1" HorizontalAlignment="Left" Margin="0 5" x:Name="AddPolicyCombo">
483							<ComboBoxItem loc:Translate.Uid="GeneralAddPolicyDont" Content="{loc:Translate Content}"/>
484							<ComboBoxItem loc:Translate.Uid="GeneralAddPolicyLibrary" Content="{loc:Translate Content}"/>
485							<ComboBoxItem loc:Translate.Uid="GeneralAddPolicyBoth" Content="{loc:Translate Content}"/>
486						</ComboBox>
487
488						<TextBlock Grid.Row="6" Grid.Column="0" loc:Translate.Uid="GeneralPlayPolicy" Text="{loc:Translate Text}" VerticalAlignment="Center"/>
489						<ComboBox Grid.Row="6" Grid.Column="1" HorizontalAlignment="Left" Margin="0 5" x:Name="PlayPolicyCombo">
490							<ComboBoxItem loc:Translate.Uid="GeneralPlayPolicyPlay" Content="{loc:Translate Content}"/>
491							<ComboBoxItem loc:Translate.Uid="GeneralPlayPolicyDont" Content="{loc:Translate Content}"/>
492							<ComboBoxItem loc:Translate.Uid="GeneralPlayPolicyBack" Content="{loc:Translate Content}"/>
493							<ComboBoxItem loc:Translate.Uid="GeneralPlayPolicyFront" Content="{loc:Translate Content}"/>
494						</ComboBox>
495
496
497						<TextBlock Grid.Column="0" Grid.Row="7" loc:Translate.Uid="GeneralPausePlayback" Text="{loc:Translate Text}" Margin="0 30 10 5" />
498
499						<TextBlock Grid.Column="0" Grid.Row="8" loc:Translate.Uid="GeneralPausePlaybackLocked" Text="{loc:Translate Text}" Margin="0 5 10 5" />
500						<CheckBox  Grid.Column="1" Grid.Row="8" x:Name="GeneralPauseWhileLocked" Margin="0 5" IsChecked="{Binding PauseWhileLocked}" />
501						<TextBlock Grid.Column="0" Grid.Row="9" loc:Translate.Uid="GeneralPausePlaybackLoggedOut" Text="{loc:Translate Text}" Margin="0 5 10 5" />
502						<CheckBox  Grid.Column="1" Grid.Row="9" x:Name="GeneralPauseWhileLoggedOut" Margin="0 5" IsChecked="{Binding PauseWhileLoggedOut}" />
503					</Grid>
504
505
506				</DockPanel>
507			</ScrollViewer>
508
509			<!-- Tab: Services -->
510			<ScrollViewer x:Name="ControlPanelServices" Visibility="Collapsed" Grid.Column="1" VerticalScrollBarVisibility="Auto">
511				<DockPanel Name="ServiceRootPanel" Background="White" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
512					<TextBlock DockPanel.Dock="Top" 
513							   Style="{DynamicResource AeroControlPanelTitleStyle}" 
514							   x:Name="ServicesTitle" 
515							   loc:Translate.Uid="ServicesTitle" 
516							   Text="{loc:Translate Text}"/>
517
518
519					<!-- ACCOUNT -->
520					<DockPanel DockPanel.Dock="Top" Margin="25 15 0 5" LastChildFill="True">
521						<TextBlock loc:Translate.Uid="ServicesAccountTitle" Text="{loc:Translate Text}" DockPanel.Dock="Left"/>
522						<Separator Background="#CCCCCC" Height="2" Margin="5 0 5 0" SnapsToDevicePixels="True" />
523					</DockPanel>
524					<TextBlock Margin="50 5 0 5" TextWrapping="Wrap" DockPanel.Dock="Top" loc:Translate.Uid="ServicesAccountText" Text="{loc:Translate Text}"/>
525					<DockPanel Margin="50 5 5 5" DockPanel.Dock="Top" LastChildFill="True" Name="ServiceAccountPanel">
526
527						<Button DockPanel.Dock="Top" loc:Translate.Uid="ServicesAccountDelink" Content="{loc:Translate Content}" Name="Delink" Click="Delink_Click"
528								Height="20" MinWidth="80" HorizontalAlignment="Left"/>
529						<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Name="DeviceNamePanel" Margin="0 5">
530							<TextBlock loc:Translate.Uid="ServicesDeviceName" Text="{loc:Translate Text}" VerticalAlignment="Center"/>
531							<Stoffi:EditableTextBlock x:Name="DeviceName" Width="100" SimpleHover="True" ClickToEdit="True" Edited="DeviceName_Edited"
532													  VerticalAlignment="Center" Margin="5 0 0 0"/>
533						</StackPanel>
534						<Grid DockPanel.Dock="Top" Margin="50 5 5 5" Name="BrowserContainer">
535							<Grid.RowDefinitions>
536								<RowDefinition Height="200"/>
537							</Grid.RowDefinitions>
538
539							<WebBrowser Grid.Row="0" Name="ServiceBrowser" Navigating="ServiceBrowser_Navigating" Navigated="ServiceBrowser_Navigated"/>
540							<Label Grid.Row="0" HorizontalContentAlignment="Center" Name="BrowserLoadingIndicator"
541								   VerticalContentAlignment="Center">
542								<StackPanel Orientation="Vertical">
543									<TextBlock Text="Loading..." HorizontalAlignment="Center" Name="BrowserMessage"/>
544									<ProgressBar Width="200" Height="12" Margin="10" IsIndeterminate="True" Name="BrowserProgress"/>
545								</StackPanel>
546							</Label>
547						</Grid>
548					</DockPanel>
549
550					<StackPanel Name="ServicePanel" DockPanel.Dock="Top">
551
552						<!-- PRIVACY -->
553						<DockPanel Margin="25 15 0 5" LastChildFill="True">
554							<TextBlock loc:Translate.Uid="ServicesPrivacyTitle" Text="{loc:Translate Text}" DockPanel.Dock="Left"/>
555							<Separator Background="#CCCCCC" Height="2" Margin="5 0 5 0" SnapsToDevicePixels="True" />
556						</DockPanel>
557						<TextBlock Margin="50 5 0 5" TextWrapping="Wrap" loc:Translate.Uid="ServicesPrivacyText" Text="{loc:Translate Text}"/>
558						<Grid Name="ServicePrivacyGrid" Margin="50 5 5 5">
559							<Grid.ColumnDefinitions>
560								<ColumnDefinition Width="Auto"/>
561								<ColumnDefinition Width="*"/>
562							</Grid.ColumnDefinitions>
563							<Grid.RowDefinitions>
564								<RowDefinition Height="Auto"/>
565								<RowDefinition Height="Auto"/>
566								<RowDefinition Height="Auto"/>
567								<RowDefinition Height="Auto"/>
568								<RowDefinition Height="Auto"/>
569								<RowDefinition Height="Auto"/>
570							</Grid.RowDefinitions>
571
572							<TextBlock Grid.Column="0" Grid.Row="0" loc:Translate.Uid="ServicesSubmit" Text="{loc:Translate Text}" Margin="0 25 10 5" Grid.ColumnSpan="2" />
573
574							<TextBlock Grid.Column="0" Grid.Row="1" loc:Translate.Uid="ServicesSubmitSongs" Text="{loc:Translate Text}" Margin="0 5 10 5" />
575							<CheckBox  Grid.Column="1" Grid.Row="1" x:Name="ServicesSubmitSongs" Margin="0 5" IsChecked="{Binding SubmitSongs}" />
576							<TextBlock Grid.Column="0" Grid.Row="2" loc:Translate.Uid="ServicesSubmitPlaylists" Text="{loc:Translate Text}" Margin="0 5 10 5" />
577							<CheckBox  Grid.Column="1" Grid.Row="2" x:Name="ServicesSubmitPlaylists" Margin="0 5" IsChecked="{Binding SubmitPlaylists}" />
578
579							<TextBlock Grid.Column="0" Grid.Row="3" loc:Translate.Uid="ServicesSynchronize" Text="{loc:Translate Text}" Margin="0 25 10 5" Grid.ColumnSpan="2" />
580							<TextBlock Grid.Column="0" Grid.Row="4" loc:Translate.Uid="ServicesSynchronizeProfile" Text="{loc:Translate Text}" Margin="0 5 10 5" VerticalAlignment="Center" />
581							<ComboBox  Grid.Column="1" Grid.Row="4" HorizontalAlignment="Left" Margin="0 5" x:Name="SynchronizeProfile" VerticalAlignment="Center" SelectionChanged="SynchronizeProfile_SelectionChanged">
582								<ComboBoxItem loc:Translate.Uid="ServicesNoSynchronize" Content="{loc:Translate Content}" IsSelected="True" Tag="-1"/>
583							</ComboBox>
584							<StackPanel Grid.Column="1" Grid.Row="5">
585								<Expander Header="Manage profiles" Name="ManageConfigs" Expanded="ManageConfigs_Expanded" Collapsed="ManageConfigs_Collapsed"/>
586								<StackPanel Orientation="Vertical" Name="ConfigPanel" Visibility="Collapsed">
587									<Button Content="New profile" MinWidth="100" HorizontalAlignment="Left" Margin="5" Name="NewConfiguration"
588											Click="NewConfiguration_Click"/>
589								</StackPanel>
590							</StackPanel>
591						</Grid>
592						
593					</StackPanel>
594
595				</DockPanel>
596			</ScrollViewer>
597
598		</Grid>
599	</DockPanel>
600</UserControl>