root / trunk / Pithos.Client.WPF / Shell / ShellView.xaml @ dcca46c3
History | View | Annotate | Download (8.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" WindowStartupLocation="CenterScreen" WindowStyle="None" |
7 |
Visibility="Collapsed" |
8 |
Width="700" Height="200" SizeToContent="Width" WindowState="Minimized" Icon="/PithosPlus;component/Images/PithosTaskbar.png" xmlns:my="clr-namespace:Pithos.Client.WPF.Converters"> |
9 |
|
10 |
<!-- |
11 |
<Window.Background> |
12 |
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> |
13 |
<GradientStop Color="#4085A5" Offset="0"/> |
14 |
<GradientStop Color="#D7E8F0" Offset="1"/> |
15 |
</LinearGradientBrush> |
16 |
</Window.Background> |
17 |
--> |
18 |
<Window.Resources> |
19 |
<ResourceDictionary> |
20 |
<ResourceDictionary.MergedDictionaries> |
21 |
<ResourceDictionary Source="../PithosStyles.xaml" /> |
22 |
</ResourceDictionary.MergedDictionaries> |
23 |
<BooleanToVisibilityConverter x:Key="BooleanToVisible" /> |
24 |
<my:SingleLineConverter x:Key="SingleConverter" /> |
25 |
</ResourceDictionary> |
26 |
</Window.Resources> |
27 |
<Grid> |
28 |
<Grid.RowDefinitions> |
29 |
<RowDefinition Height="*"/> |
30 |
<RowDefinition Height="Auto"/> |
31 |
</Grid.RowDefinitions> |
32 |
|
33 |
<tb:TaskbarIcon x:Name="TaskbarView" |
34 |
IconSource="{Binding StatusIcon}" |
35 |
ToolTipText="{Binding TooltipMessage}" |
36 |
MenuActivation="LeftOrRightClick" |
37 |
DoubleClickCommand="{Binding OpenPithosFolderCommand}" |
38 |
> |
39 |
<tb:TaskbarIcon.ContextMenu> |
40 |
<ContextMenu x:Name="TaskbarMenu" > |
41 |
<MenuItem Header="{Binding OpenFolderCaption}" IsEnabled="{Binding HasAccounts}" x:Name="OpenPithosFolder" ItemsSource="{Binding Accounts}" > |
42 |
<MenuItem.ItemTemplate> |
43 |
<DataTemplate> |
44 |
<TextBlock x:Name="AccountLink" Text="{Binding Path=UserName}" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action OpenPithosFolder($dataContext)]" |
45 |
cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=2}, Path=DataContext}" /> |
46 |
</DataTemplate> |
47 |
</MenuItem.ItemTemplate> |
48 |
<MenuItem.Icon> |
49 |
<Image Source="/PithosPlus;component/Images/Folder.ico" /> |
50 |
</MenuItem.Icon> |
51 |
</MenuItem> |
52 |
<MenuItem Header="Go to Account Site" x:Name="GoToSiteMenu" ItemsSource="{Binding Accounts}" Visibility="{Binding Path=HasAccounts, Converter={StaticResource BooleanToVisible}}" > |
53 |
<MenuItem.ItemTemplate> |
54 |
<DataTemplate> |
55 |
<TextBlock x:Name="AccountLink" Text="{Binding Path=UserName}" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action GoToSite($dataContext)]" |
56 |
cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=2}, Path=DataContext}" /> |
57 |
</DataTemplate> |
58 |
</MenuItem.ItemTemplate> |
59 |
<MenuItem.Icon> |
60 |
<Image Source="/PithosPlus;component/Images/Web.ico" /> |
61 |
</MenuItem.Icon> |
62 |
</MenuItem> |
63 |
|
64 |
<MenuItem Header="Recently Changed Files" x:Name="RecentFiles" ItemsSource="{Binding RecentFiles}"> |
65 |
<MenuItem.ItemTemplate> |
66 |
<DataTemplate> |
67 |
<TextBlock Text="{Binding FileName}" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action GoToFile($dataContext)]" |
68 |
cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=2}, Path=DataContext}" /> |
69 |
</DataTemplate> |
70 |
</MenuItem.ItemTemplate> |
71 |
</MenuItem> |
72 |
<MenuItem Header="Sync Now" x:Name="SynchNow" cal:Message.Attach="SynchNow" Visibility="{Binding Path=HasAccounts, Converter={StaticResource BooleanToVisible}}" /> |
73 |
<Separator Visibility="{Binding Path=HasAccounts, Converter={StaticResource BooleanToVisible}}"/> |
74 |
<MenuItem Header="Usage" x:Name="Usages" ItemsSource="{Binding Accounts}" Visibility="{Binding Path=HasAccounts, Converter={StaticResource BooleanToVisible}}" > |
75 |
<MenuItem.ItemTemplate> |
76 |
<DataTemplate> |
77 |
<StackPanel Orientation="Horizontal"> |
78 |
<TextBlock Text="{Binding UserName}" /> |
79 |
<TextBlock Text=":" Margin="5,0"/> |
80 |
<TextBlock Text="{Binding Usage}" /> |
81 |
</StackPanel> |
82 |
</DataTemplate> |
83 |
</MenuItem.ItemTemplate> |
84 |
</MenuItem> |
85 |
<Separator /> |
86 |
<MenuItem x:Name="StatusMessage" Header="{Binding Path=StatusMessage, Converter={StaticResource SingleConverter}}" MaxWidth="200" cal:Message.Attach="OnStatusAction" ToolTip="{Binding TooltipMessage}"/> |
87 |
<Separator Visibility="{Binding Path=HasAccounts, Converter={StaticResource BooleanToVisible}}"/> |
88 |
<MenuItem Header="{Binding PauseSyncCaption}" x:Name="ToggleSynching" cal:Message.Attach="ToggleSynching" Visibility="{Binding Path=HasAccounts, Converter={StaticResource BooleanToVisible}}"/> |
89 |
<Separator /> |
90 |
<MenuItem Header="Preferences ..." x:Name="ShowPreferences" cal:Message.Attach="ShowPreferences" /> |
91 |
<Separator /> |
92 |
<MenuItem Header="Send Feedback" x:Name="SendFeedback" cal:Message.Attach="SendFeedback"> |
93 |
<MenuItem.Icon> |
94 |
<Image Source="/PithosPlus;component/Images/Feedback.ico" /> |
95 |
</MenuItem.Icon> |
96 |
</MenuItem> |
97 |
<MenuItem Header="Check For Updates" x:Name="CheckForUpgrade" cal:Message.Attach="CheckForUpgrade"/> |
98 |
<MenuItem Header="{Binding MiniStatusCaption}" x:Name="ShowMiniStatus" cal:Message.Attach="ShowMiniStatus"/> |
99 |
<MenuItem x:Name="GoToSiteRootMenu" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action GoToSite()]" |
100 |
cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=1}, Path=DataContext}" > |
101 |
<MenuItem.HeaderTemplate> |
102 |
<DataTemplate> |
103 |
<TextBlock x:Name="SiteLink" Text="Go To Pithos Site" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action GoToSite()]" |
104 |
cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=1}, Path=DataContext}" /> |
105 |
</DataTemplate> |
106 |
</MenuItem.HeaderTemplate> |
107 |
<MenuItem.Icon> |
108 |
<Image Source="/PithosPlus;component/Images/Web.ico" /> |
109 |
</MenuItem.Icon> |
110 |
</MenuItem> |
111 |
<MenuItem Header="About Pithos" x:Name="AboutPithos" cal:Message.Attach="AboutPithos"> |
112 |
<MenuItem.Icon> |
113 |
<Image Source="/PithosPlus;component/Images/About.ico" /> |
114 |
</MenuItem.Icon> |
115 |
</MenuItem> |
116 |
<Separator /> |
117 |
<MenuItem Header="Exit" Name="ExitPithos" cal:Message.Attach="ExitPithos" /> |
118 |
</ContextMenu> |
119 |
</tb:TaskbarIcon.ContextMenu> |
120 |
<tb:TaskbarIcon.TrayToolTip> |
121 |
<Border Background="White" |
122 |
BorderBrush="Black" |
123 |
BorderThickness="1" |
124 |
CornerRadius="2"> |
125 |
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding TooltipMessage}" Margin="5"></TextBlock> |
126 |
</Border> |
127 |
</tb:TaskbarIcon.TrayToolTip> |
128 |
</tb:TaskbarIcon> |
129 |
<!-- |
130 |
<Image Margin="0,0,10,5" Source="/PithosPlus;component/Images/logo.png" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Stretch="None"/> |
131 |
--> |
132 |
</Grid> |
133 |
</Window> |