root / trunk / Pithos.Client.WPF / ShellView.xaml @ 0bd56b7c
History | View | Annotate | Download (3.9 kB)
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" cal:Message.Attach="OpenPithosFolder" FontWeight="Bold" /> |
31 |
<MenuItem Header="Go to Account Site" x:Name="GoToSiteMenu" ItemsSource="{Binding Accounts}" > |
32 |
<MenuItem.ItemTemplate> |
33 |
<DataTemplate> |
34 |
<TextBlock x:Name="AccountLink" Text="{Binding Path=UserName}" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action GoToSite($dataContext)]" |
35 |
cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=2}, Path=DataContext}" /> |
36 |
</DataTemplate> |
37 |
</MenuItem.ItemTemplate> |
38 |
</MenuItem> |
39 |
|
40 |
<MenuItem Header="Recently Changed Files" x:Name="RecentFiles" ItemsSource="{Binding RecentFiles}"> |
41 |
<MenuItem.ItemTemplate> |
42 |
<DataTemplate> |
43 |
<TextBlock Text="{Binding FileName}"/> |
44 |
</DataTemplate> |
45 |
</MenuItem.ItemTemplate> |
46 |
</MenuItem> |
47 |
<Separator /> |
48 |
<MenuItem Header="Usage" x:Name="Usages" ItemsSource="{Binding Accounts}"> |
49 |
<MenuItem.ItemTemplate> |
50 |
<DataTemplate> |
51 |
<StackPanel Orientation="Horizontal"> |
52 |
<TextBlock Text="{Binding UserName}" /> |
53 |
<TextBlock Text=":" Margin="5,0"/> |
54 |
<TextBlock Text="{Binding Usage}" /> |
55 |
</StackPanel> |
56 |
</DataTemplate> |
57 |
</MenuItem.ItemTemplate> |
58 |
</MenuItem> |
59 |
<Separator /> |
60 |
<MenuItem Header="{Binding StatusMessage}" x:Name="StatusMessage" /> |
61 |
<Separator /> |
62 |
<MenuItem Header="{Binding PauseSyncCaption}" x:Name="ToggleSynching" cal:Message.Attach="ToggleSynching" /> |
63 |
<Separator /> |
64 |
<MenuItem Header="Preferences ..." x:Name="ShowPreferences" cal:Message.Attach="ShowPreferences" /> |
65 |
<Separator /> |
66 |
<MenuItem Header="Exit" Name="ExitPithos" cal:Message.Attach="ExitPithos" /> |
67 |
</ContextMenu> |
68 |
</tb:TaskbarIcon.ContextMenu> |
69 |
</tb:TaskbarIcon> |
70 |
</Grid> |
71 |
</Window> |