xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="clr-namespace:Hardcodet.Wpf.TaskbarNotification;assembly=Hardcodet.Wpf.TaskbarNotification"
xmlns:cal="http://www.caliburnproject.org"
- x:Name="TheView"
- >
+ x:Name="TheView" WindowStartupLocation="CenterScreen" WindowStyle="None"
+ Visibility="Collapsed"
+ Width="0" Height="0" WindowState="Minimized" Icon="/PithosPlus;component/Images/PithosTaskbar.png" xmlns:my="clr-namespace:Pithos.Client.WPF.Converters">
+<!--
+ <Window.Background>
+ <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
+ <GradientStop Color="#4085A5" Offset="0"/>
+ <GradientStop Color="#D7E8F0" Offset="1"/>
+ </LinearGradientBrush>
+ </Window.Background>
+-->
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../PithosStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
+ <BooleanToVisibilityConverter x:Key="BooleanToVisible" />
+ <my:SingleLineConverter x:Key="SingleConverter" />
</ResourceDictionary>
</Window.Resources>
<Grid>
<tb:TaskbarIcon x:Name="TaskbarView"
IconSource="{Binding StatusIcon}"
- ToolTipText="{Binding StatusMessage}"
+ ToolTipText="{Binding TooltipMessage}"
MenuActivation="LeftOrRightClick"
DoubleClickCommand="{Binding OpenPithosFolderCommand}"
>
<tb:TaskbarIcon.ContextMenu>
<ContextMenu x:Name="TaskbarMenu" >
- <MenuItem Header="Open PITHOS Folder" x:Name="OpenPithosFolder" ItemsSource="{Binding Accounts}" >
- <MenuItem.ItemTemplate>
+ <MenuItem Header="{Binding OpenFolderCaption}" IsEnabled="{Binding HasAccounts}" x:Name="OpenPithosFolder" ItemsSource="{Binding Accounts}" >
+ <MenuItem.ItemTemplate>
<DataTemplate>
- <TextBlock x:Name="AccountLink" Text="{Binding Path=UserName}" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action OpenPithosFolder($dataContext)]"
- cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=2}, Path=DataContext}" />
+ <StackPanel
+ cal:Message.Attach="[Event MouseLeftButtonUp]=[Action OpenPithosFolder($dataContext)]"
+ cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=2}, Path=DataContext}" >
+ <TextBlock x:Name="AccountLink" Text="{Binding Path=UserName}" />
+ <TextBlock Text="{Binding Path=StorageUri}" FontStyle="Italic" FontSize="10" />
+ </StackPanel>
</DataTemplate>
</MenuItem.ItemTemplate>
- </MenuItem>
- <MenuItem Header="Go to Account Site" x:Name="GoToSiteMenu" ItemsSource="{Binding Accounts}" >
+ <MenuItem.Icon>
+ <Image Source="/PithosPlus;component/Images/Folder.ico" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="Go to Account Site" x:Name="GoToSiteMenu" ItemsSource="{Binding Accounts}" Visibility="{Binding Path=HasAccounts, Converter={StaticResource BooleanToVisible}}" >
<MenuItem.ItemTemplate>
<DataTemplate>
- <TextBlock x:Name="AccountLink" Text="{Binding Path=UserName}" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action GoToSite($dataContext)]"
- cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=2}, Path=DataContext}" />
+ <StackPanel
+ cal:Message.Attach="[Event MouseLeftButtonUp]=[Action GoToSite($dataContext)]"
+ cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=2}, Path=DataContext}" >
+ <TextBlock x:Name="AccountLink" Text="{Binding Path=UserName}" />
+ <TextBlock Text="{Binding Path=StorageUri}" FontStyle="Italic" FontSize="10" />
+ </StackPanel>
</DataTemplate>
</MenuItem.ItemTemplate>
+ <MenuItem.Icon>
+ <Image Source="/PithosPlus;component/Images/Web.ico" />
+ </MenuItem.Icon>
</MenuItem>
<MenuItem Header="Recently Changed Files" x:Name="RecentFiles" ItemsSource="{Binding RecentFiles}">
<MenuItem.ItemTemplate>
<DataTemplate>
- <TextBlock Text="{Binding FileName}"/>
+ <TextBlock Text="{Binding FileName}" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action GoToFile($dataContext)]"
+ cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=2}, Path=DataContext}" />
</DataTemplate>
</MenuItem.ItemTemplate>
</MenuItem>
- <Separator />
- <MenuItem Header="Usage" x:Name="Usages" ItemsSource="{Binding Accounts}">
+ <MenuItem Header="Sync Now" x:Name="SynchNow" cal:Message.Attach="SynchNow" Visibility="{Binding Path=HasAccounts, Converter={StaticResource BooleanToVisible}}" />
+ <Separator Visibility="{Binding Path=HasAccounts, Converter={StaticResource BooleanToVisible}}"/>
+ <MenuItem Header="Usage" x:Name="Usages" ItemsSource="{Binding Accounts}" Visibility="{Binding Path=HasAccounts, Converter={StaticResource BooleanToVisible}}" >
<MenuItem.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
</MenuItem.ItemTemplate>
</MenuItem>
<Separator />
- <MenuItem Header="{Binding StatusMessage}" x:Name="StatusMessage" />
- <Separator />
- <MenuItem Header="{Binding PauseSyncCaption}" x:Name="ToggleSynching" cal:Message.Attach="ToggleSynching" />
+ <MenuItem x:Name="StatusMessage" Header="{Binding Path=StatusMessage, Converter={StaticResource SingleConverter}}" MaxWidth="200" cal:Message.Attach="OnStatusAction" ToolTip="{Binding TooltipMessage}"/>
+ <Separator Visibility="{Binding Path=HasAccounts, Converter={StaticResource BooleanToVisible}}"/>
+ <MenuItem Header="{Binding PauseSyncCaption}" x:Name="ToggleSynching" cal:Message.Attach="ToggleSynching" Visibility="{Binding Path=HasAccounts, Converter={StaticResource BooleanToVisible}}"/>
<Separator />
+ <MenuItem x:Name="ShowConflicts" Header="Show Conflicts" Visibility="{Binding Path=HasConflicts, Converter={StaticResource BooleanToVisible}}" cal:Message.Attach="ShowConflicts" />
<MenuItem Header="Preferences ..." x:Name="ShowPreferences" cal:Message.Attach="ShowPreferences" />
<Separator />
- <MenuItem Header="Send Feedback " x:Name="SendFeedback" cal:Message.Attach="SendFeedback" />
- <MenuItem Header="About Pithos" x:Name="AboutPithos" cal:Message.Attach="AboutPithos" />
+ <MenuItem Header="Send Feedback" x:Name="SendFeedback" cal:Message.Attach="SendFeedback">
+ <MenuItem.Icon>
+ <Image Source="/PithosPlus;component/Images/Feedback.ico" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="Check For Updates" x:Name="CheckForUpgrade" cal:Message.Attach="CheckForUpgrade"/>
+ <MenuItem Header="{Binding MiniStatusCaption}" x:Name="ShowMiniStatus" cal:Message.Attach="ShowMiniStatus"/>
+ <MenuItem x:Name="GoToSiteRootMenu" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action GoToSite()]"
+ cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=1}, Path=DataContext}" >
+ <MenuItem.HeaderTemplate>
+ <DataTemplate>
+ <TextBlock x:Name="SiteLink" Text="Go To Pithos Site" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action GoToSite()]"
+ cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=1}, Path=DataContext}" />
+ </DataTemplate>
+ </MenuItem.HeaderTemplate>
+ <MenuItem.Icon>
+ <Image Source="/PithosPlus;component/Images/Web.ico" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="About Pithos" x:Name="AboutPithos" cal:Message.Attach="AboutPithos">
+ <MenuItem.Icon>
+ <Image Source="/PithosPlus;component/Images/About.ico" />
+ </MenuItem.Icon>
+ </MenuItem>
<Separator />
<MenuItem Header="Exit" Name="ExitPithos" cal:Message.Attach="ExitPithos" />
</ContextMenu>
</tb:TaskbarIcon.ContextMenu>
+ <tb:TaskbarIcon.TrayToolTip>
+ <Border Background="White"
+ BorderBrush="Black"
+ BorderThickness="1"
+ CornerRadius="2">
+ <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding TooltipMessage}" Margin="5"></TextBlock>
+ </Border>
+ </tb:TaskbarIcon.TrayToolTip>
</tb:TaskbarIcon>
+<!--
+ <Image Margin="0,0,10,5" Source="/PithosPlus;component/Images/logo.png" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Stretch="None"/>
+-->
</Grid>
</Window>