a464355669db804b8eb85cdf2ba53f6dea7e74b3
[pithos-ms-client] / trunk / Pithos.Client.WPF / ShellView.xaml
1 <Window x:Class="Pithos.Client.WPF.ShellView"
2         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4         xmlns:tb="clr-namespace:Hardcodet.Wpf.TaskbarNotification;assembly=Hardcodet.Wpf.TaskbarNotification" 
5         xmlns:cal="http://www.caliburnproject.org"
6         x:Name="TheView"
7          >
8
9     <Window.Resources>
10         <ResourceDictionary>
11             <ResourceDictionary.MergedDictionaries>
12                 <ResourceDictionary Source="PithosStyles.xaml" />
13             </ResourceDictionary.MergedDictionaries>
14         </ResourceDictionary>
15     </Window.Resources>
16     <Grid>
17         <Grid.RowDefinitions>
18             <RowDefinition Height="*"/>
19             <RowDefinition Height="Auto"/>
20         </Grid.RowDefinitions>
21
22         <tb:TaskbarIcon x:Name="TaskbarView"                           
23                         IconSource="{Binding StatusIcon}" 
24                         ToolTipText="{Binding StatusMessage}"                        
25                         MenuActivation="LeftOrRightClick" 
26                         DoubleClickCommand="{Binding OpenPithosFolderCommand}"                         
27                         >
28             <tb:TaskbarIcon.ContextMenu>
29                 <ContextMenu x:Name="TaskbarMenu" >
30                     <MenuItem Header="Open PITHOS Folder" x:Name="OpenPithosFolder" ItemsSource="{Binding Accounts}" >
31                         <MenuItem.ItemTemplate>
32                             <DataTemplate>
33                                 <TextBlock x:Name="AccountLink" Text="{Binding Path=UserName}" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action OpenPithosFolder($dataContext)]" 
34                                            cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=2}, Path=DataContext}" />
35                             </DataTemplate>
36                         </MenuItem.ItemTemplate>                        
37                         </MenuItem> 
38                     <MenuItem Header="Go to Account Site" x:Name="GoToSiteMenu" ItemsSource="{Binding Accounts}" >
39                         <MenuItem.ItemTemplate>
40                             <DataTemplate>
41                                 <TextBlock x:Name="AccountLink" Text="{Binding Path=UserName}" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action GoToSite($dataContext)]" 
42                                            cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=2}, Path=DataContext}" />
43                             </DataTemplate>
44                         </MenuItem.ItemTemplate>
45                     </MenuItem>
46
47                     <MenuItem Header="Recently Changed Files" x:Name="RecentFiles" ItemsSource="{Binding RecentFiles}">
48                         <MenuItem.ItemTemplate>
49                             <DataTemplate>
50                                 <TextBlock Text="{Binding FileName}"/>
51                             </DataTemplate>
52                         </MenuItem.ItemTemplate>
53                     </MenuItem>
54                     <Separator  />                    
55                     <MenuItem Header="Usage" x:Name="Usages" ItemsSource="{Binding Accounts}">
56                         <MenuItem.ItemTemplate>
57                             <DataTemplate>
58                                 <StackPanel Orientation="Horizontal">
59                                     <TextBlock Text="{Binding UserName}" />
60                                     <TextBlock Text=":" Margin="5,0"/>
61                                     <TextBlock Text="{Binding Usage}" />
62                                 </StackPanel>
63                             </DataTemplate>
64                         </MenuItem.ItemTemplate>
65                     </MenuItem>
66                     <Separator  />
67                     <MenuItem Header="{Binding StatusMessage}" x:Name="StatusMessage" />
68                     <Separator  />
69                     <MenuItem  Header="{Binding PauseSyncCaption}" x:Name="ToggleSynching" cal:Message.Attach="ToggleSynching"  />
70                     <Separator  />
71                     <MenuItem  Header="Preferences ..." x:Name="ShowPreferences" cal:Message.Attach="ShowPreferences"  />
72                     <Separator  />
73                     <MenuItem  Header="Properties ..." x:Name="ShowFileProperties" cal:Message.Attach="ShowFileProperties"  />
74                     <Separator  />
75                     <MenuItem  Header="Exit" Name="ExitPithos" cal:Message.Attach="ExitPithos" />
76                 </ContextMenu>
77             </tb:TaskbarIcon.ContextMenu>
78         </tb:TaskbarIcon>
79     </Grid>
80 </Window>