Added UI for SelectiveSynch
[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" Title="Selective Synch" Height="300" Width="300" >
5     <Window.Resources>        
6         
7         <Style x:Key="TreeItemStyle" TargetType="TreeViewItem">
8             <Setter Property="IsExpanded" Value="True" />
9             <Setter Property="IsSelected" Value="{Binding IsInitiallySelected, Mode=OneTime}" />
10             <Setter Property="KeyboardNavigation.AcceptsReturn" Value="True" />
11             <Setter Property="local:VirtualToggleButton.IsVirtualToggleButton" Value="True" />
12             <Setter Property="local:VirtualToggleButton.IsChecked" Value="{Binding IsChecked}" />
13         </Style>
14
15         <HierarchicalDataTemplate x:Key="CheckboxStyle" DataType="{x:Type local:DirectoryRecord}"
16                                     ItemsSource="{Binding Directories}" >
17             <StackPanel Orientation="Horizontal">
18                 <CheckBox
19             Focusable="False" 
20             IsChecked="{Binding IsChecked}" 
21             VerticalAlignment="Center"
22             />
23                 <ContentPresenter 
24             Content="{Binding Info.Name, Mode=OneTime}" 
25             Margin="2,0"
26             />
27             </StackPanel>
28         </HierarchicalDataTemplate>
29
30     </Window.Resources>
31     <Grid>
32         <Grid.RowDefinitions>
33             <RowDefinition Height="*"/>
34             <RowDefinition Height="Auto"/>
35         </Grid.RowDefinitions>
36         <TreeView Grid.Row="0" Name="PithosDirectory" 
37                   ItemContainerStyle="{StaticResource TreeItemStyle}" 
38                   ItemTemplate="{StaticResource CheckboxStyle}">
39         </TreeView>
40         <StackPanel Grid.Row="1">
41             <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right">
42                 <Button Name="SaveChanges" Content="OK" Margin="5,5,10,5" />
43                 <Button Name="RejectChanges" Content="Cancel" Margin="5,5,10,5" />                
44             </StackPanel>
45         </StackPanel>
46     </Grid>
47 </Window>