Added option to disable selective Synchronization
[pithos-ms-client] / trunk / Pithos.Client.WPF / SelectiveSynch / SelectiveSynchView.xaml
1 <Window x:Class="Pithos.Client.WPF.SelectiveSynch.SelectiveSynchView"
2         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4         xmlns:local="clr-namespace:Pithos.Client.WPF.SelectiveSynch"
5         xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
6         xmlns:Converters="clr-namespace:Pithos.Client.WPF.Converters" 
7         Title="Selective Synch" Height="500" Width="500" 
8         ShowInTaskbar="true"
9         WindowStartupLocation="CenterScreen"
10         Icon="/PithosPlus;component/Images/PithosTaskbar.png"
11         Background="{StaticResource {x:Static SystemColors.ControlBrushKey}}">
12     <Window.Resources>
13         <ResourceDictionary>
14             <ResourceDictionary.MergedDictionaries>
15                 <ResourceDictionary Source="..\PithosStyles.xaml" />
16             </ResourceDictionary.MergedDictionaries>
17             <Converters:NullToVisibilityConverter x:Key="NullToVisible" />
18             <Style x:Key="TreeItemStyle" TargetType="TreeViewItem">
19                 <Setter Property="IsExpanded" Value="True" />
20                 <Setter Property="IsSelected" Value="{Binding IsInitiallySelected, Mode=OneTime}" />
21                 <Setter Property="KeyboardNavigation.AcceptsReturn" Value="True" />
22                 <Setter Property="local:VirtualToggleButton.IsVirtualToggleButton" Value="True" />
23                 <Setter Property="local:VirtualToggleButton.IsChecked" Value="{Binding IsChecked}" />
24             </Style>
25             <HierarchicalDataTemplate x:Key="CheckboxStyle" DataType="{x:Type local:DirectoryRecord}"
26                                     ItemsSource="{Binding Directories}" >
27                 <StackPanel Orientation="Horizontal">
28                     <CheckBox
29             Focusable="False" 
30             IsChecked="{Binding IsChecked}" 
31             VerticalAlignment="Center"
32             />
33                     <ContentPresenter 
34             Content="{Binding DisplayName, Mode=OneTime}" 
35             Margin="2,0"
36             />
37                 </StackPanel>
38             </HierarchicalDataTemplate>
39
40         </ResourceDictionary>
41
42
43     </Window.Resources>
44     <extToolkit:BusyIndicator Name="IsBusy" BusyContent="Retrieving folders ..." DisplayAfter="0">
45         <Grid>
46         <Grid.RowDefinitions>
47             <RowDefinition Height="Auto"/>
48             <RowDefinition Height="*"/>
49             <RowDefinition Height="Auto"/>
50         </Grid.RowDefinitions>
51         <CheckBox x:Name="IsEnabled" Content="Enable Selective Syncing" Margin="5" Grid.Row="0"/>
52         <TreeView  Name="RootNodes" Margin="5" Grid.Row="1"
53                 ItemContainerStyle="{StaticResource TreeItemStyle}" 
54                 ItemTemplate="{StaticResource CheckboxStyle}"
55                     IsEnabled="{Binding IsEnabled}" >
56         </TreeView>
57         <StackPanel Grid.Row="2">
58             <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right">
59                 <Button Name="SaveChanges" Content="OK" Margin="5,5,10,5"  Style="{StaticResource ButtonStyle}"/>
60                 <Button Name="RejectChanges" Content="Cancel" Margin="5,5,10,5"  Style="{StaticResource ButtonStyle}"/>                
61             </StackPanel>
62         </StackPanel>
63     </Grid>
64     </extToolkit:BusyIndicator>
65 </Window>