Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
87 lines (77 sloc) 5.14 KB
<UserControl x:Class="GG.UserControls.LeftToolbar"
x:Name="LeftToolbarUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:contextMenus="clr-namespace:GG.UserControls.LeftToolbarContextMenus"
mc:Ignorable="d">
<UserControl.Resources>
<contextMenus:TagContextMenu x:Key="tagContextMenu" />
</UserControl.Resources>
<Border BorderBrush="#bbb" BorderThickness="1,1,1,0">
<Grid>
<Grid VerticalAlignment="Stretch" Style="{StaticResource LeftToolbarStyle}" HorizontalAlignment="Left" Width="160">
<Grid Margin="8" d:DataContext="{d:DesignData Source=../DesignData/Branches.xaml}">
<TreeView Background="{x:Null}" BorderThickness="0" Padding="0">
<TreeViewItem ItemsSource="{Binding Branches}"
PreviewMouseRightButtonDown="OnPreviewMouseRightButtonDown"
Tag="{Binding}">
<TreeViewItem.Header>
<WrapPanel>
<Image Source="../Resources/Icons/Branch.png" Stretch="None" Style="{StaticResource LeftToolbarTitleImageStyle}" />
<TextBlock Style="{StaticResource LeftToolbarTitleStyle}">BRANCHES</TextBlock>
</WrapPanel>
</TreeViewItem.Header>
<TreeViewItem.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" Style="{StaticResource LeftToolbarTitleStyle}" Tag="{Binding ElementName=LeftToolbarUserControl}" />
</DataTemplate>
</TreeViewItem.ItemTemplate>
</TreeViewItem>
<TreeViewItem ItemsSource="{Binding Tags}"
PreviewMouseRightButtonDown="OnPreviewMouseRightButtonDown"
ContextMenu="{StaticResource tagContextMenu}"
Tag="{Binding}">
<TreeViewItem.Header>
<WrapPanel>
<Image Source="../Resources/Icons/Tag.png" Stretch="None" Style="{StaticResource LeftToolbarTitleImageStyle}" />
<TextBlock Style="{StaticResource LeftToolbarTitleStyle}">TAGS</TextBlock>
</WrapPanel>
</TreeViewItem.Header>
<TreeViewItem.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" Style="{StaticResource LeftToolbarTitleStyle}" Tag="{Binding ElementName=LeftToolbarUserControl}" />
</DataTemplate>
</TreeViewItem.ItemTemplate>
</TreeViewItem>
<TreeViewItem ItemsSource="{Binding Remotes}">
<TreeViewItem.Header>
<WrapPanel>
<Image Source="../Resources/Icons/Remote.png" Stretch="None" Style="{StaticResource LeftToolbarTitleImageStyle}" />
<TextBlock Style="{StaticResource LeftToolbarTitleStyle}">REMOTES</TextBlock>
</WrapPanel>
</TreeViewItem.Header>
</TreeViewItem>
<TreeViewItem ItemsSource="{Binding Stashes}">
<TreeViewItem.Header>
<WrapPanel>
<Image Source="../Resources/Icons/Stash.png" Stretch="None" Style="{StaticResource LeftToolbarTitleImageStyle}" />
<TextBlock Style="{StaticResource LeftToolbarTitleStyle}">STASHES</TextBlock>
</WrapPanel>
</TreeViewItem.Header>
</TreeViewItem>
<TreeViewItem ItemsSource="{Binding Submodules}">
<TreeViewItem.Header>
<WrapPanel>
<Image Source="../Resources/Icons/Submodule.png" Stretch="None" Style="{StaticResource LeftToolbarTitleImageStyle}" />
<TextBlock Style="{StaticResource LeftToolbarTitleStyle}">SUBMODULES</TextBlock>
</WrapPanel>
</TreeViewItem.Header>
</TreeViewItem>
</TreeView>
</Grid>
</Grid>
</Grid>
</Border>
</UserControl>