sourcegit/src/Views/Widgets/Dashboard.xaml

576 lines
34 KiB
XML

<UserControl x:Class="SourceGit.Views.Widgets.Dashboard"
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:controls="clr-namespace:SourceGit.Views.Controls"
xmlns:models="clr-namespace:SourceGit.Models"
xmlns:widgets="clr-namespace:SourceGit.Views.Widgets"
xmlns:converters="clr-namespace:SourceGit.Views.Converters"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="32"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.Resources>
<converters:InverseBool x:Key="InverseBool"/>
<converters:BoolToCollapsed x:Key="BoolToCollapsed"/>
</Grid.Resources>
<!-- Toolbar -->
<Border Grid.Row="0" BorderBrush="{DynamicResource Brush.Border0}" BorderThickness="0,0,0,1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal">
<controls:IconButton
Margin="8,0"
Padding="0,9"
Icon="{DynamicResource Icon.Folder.Open}"
ToolTip="{DynamicResource Text.Dashboard.Explore}"
Click="OpenInExplorer"/>
<controls:IconButton
x:Name="btnVSCode"
Margin="8,0"
Padding="0,9"
Icon="{DynamicResource Icon.VSCode}"
ToolTip="{DynamicResource Text.Dashboard.VSCode}"
Visibility="Collapsed"
Click="OpenInVSCode"/>
<controls:IconButton
Margin="8,0"
Padding="0,9"
Icon="{DynamicResource Icon.Terminal}"
ToolTip="{DynamicResource Text.Dashboard.Terminal}"
Click="OpenInTerminal"/>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<controls:IconButton
Margin="16,0"
Padding="0,8"
Icon="{DynamicResource Icon.Fetch}"
ToolTip="{DynamicResource Text.Fetch}"
Click="OpenFetch"/>
<controls:IconButton
Margin="16,0"
Padding="0,8"
Icon="{DynamicResource Icon.Pull}"
ToolTip="{DynamicResource Text.Pull}"
Click="OpenPull"/>
<controls:IconButton
Margin="16,0"
Padding="0,8"
Icon="{DynamicResource Icon.Push}"
ToolTip="{DynamicResource Text.Push}"
Click="OpenPush"/>
<controls:IconButton
Margin="16,0"
Padding="0,8"
Icon="{DynamicResource Icon.Stashes}"
ToolTip="{DynamicResource Text.Stash}"
Click="OpenStash"/>
<controls:IconButton
Margin="16,0"
Padding="0,8"
Icon="{DynamicResource Icon.Diff}"
ToolTip="{DynamicResource Text.Apply}"
Click="OpenApply"/>
<Rectangle
Width="1" Height="16"
Margin="8,0"
VerticalAlignment="Center"
Fill="{DynamicResource Brush.Border2}"/>
<controls:IconButton
Margin="16,0"
Padding="0,8"
Icon="{DynamicResource Icon.Search}"
ToolTip="{DynamicResource Text.Dashboard.Search}"
Click="OpenSearch"/>
</StackPanel>
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
<ToggleButton
Width="16" Height="16"
Margin="0,0,8,0"
Style="{StaticResource Style.ToggleButton.SplitDirection}"
ToolTip="{DynamicResource Text.Histories.DisplayMode}"
Visibility="{Binding ElementName=pageHistories,Path=IsSelected,Converter={StaticResource BoolToCollapsed}}"
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=Window.MoveCommitInfoRight, Mode=TwoWay, Converter={StaticResource InverseBool}}"
Checked="ChangeOrientation" Unchecked="ChangeOrientation"/>
<controls:IconButton
Margin="8,0"
Padding="0,8"
Icon="{DynamicResource Icon.Statistics}"
ToolTip="{DynamicResource Text.Dashboard.Statistics}"
Click="OpenStatistics"/>
<controls:IconButton
Margin="8,0"
Padding="0,9,0,8"
Icon="{DynamicResource Icon.Loading}"
ToolTip="{DynamicResource Text.Dashboard.Refresh}"
Click="TriggerRefresh"/>
<controls:IconButton
Margin="8,0"
Padding="0,8"
Icon="{DynamicResource Icon.Clean}"
ToolTip="{DynamicResource Text.Dashboard.Clean}"
Click="OpenCleanup"/>
<controls:IconButton
Margin="8,0"
Padding="0,8"
Icon="{DynamicResource Icon.Setting}"
ToolTip="{DynamicResource Text.Dashboard.Configure}"
Click="OpenConfigure"/>
</StackPanel>
</Grid>
</Border>
<!-- Main -->
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" MinWidth="200" MaxWidth="300"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Left -->
<Grid x:Name="leftPanel" Grid.Column="0" FocusManager.IsFocusScope="True">
<Grid.RowDefinitions>
<RowDefinition Height="24"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="24"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="24"/>
<RowDefinition Height="*"/>
<RowDefinition Height="24"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="24"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="24"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.Resources>
<converters:BoolToCollapsed x:Key="BoolToCollapsed"/>
</Grid.Resources>
<!-- Workspace -->
<TextBlock Grid.Row="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.Workspace}"/>
<ListView Grid.Row="1" x:Name="workspace" SelectionMode="Single" SelectionChanged="OnPageSelectionChanged">
<ListViewItem x:Name="pageHistories" IsSelected="True" Style="{DynamicResource Style.ListViewItem.Switcher}">
<StackPanel Margin="16,0,0,0" Height="28" Orientation="Horizontal">
<Path Width="16" Height="16" Data="{StaticResource Icon.Histories}"/>
<TextBlock Margin="8,0,0,0" Text="{DynamicResource Text.Histories}"/>
</StackPanel>
</ListViewItem>
<ListViewItem Style="{DynamicResource Style.ListViewItem.Switcher}">
<Grid Margin="16,0,0,0" Height="28">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Path Grid.Column="0" Width="16" Height="16" Data="{StaticResource Icon.Send}"/>
<TextBlock Grid.Column="1" Margin="8,0,0,0" Text="{DynamicResource Text.WorkingCopy}"/>
<controls:Badge Grid.Column="2" Margin="4,0" x:Name="badgeLocalChanges"/>
</Grid>
</ListViewItem>
<ListViewItem Style="{DynamicResource Style.ListViewItem.Switcher}">
<Grid Margin="16,0,0,0" Height="28">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Path Grid.Column="0" Width="16" Height="16" Data="{StaticResource Icon.Stashes}"/>
<TextBlock Grid.Column="1" Margin="8,0,0,0" Text="{DynamicResource Text.Stashes}"/>
<controls:Badge Grid.Column="2" Margin="4,0" x:Name="badgeStashes"/>
</Grid>
</ListViewItem>
</ListView>
<!-- Local Branches -->
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.LocalBranches}"/>
<controls:IconButton Grid.Column="1" Click="OpenGitFlowPanel" Width="14" Height="14" Margin="8,0" Icon="{StaticResource Icon.Flow}" ToolTip="{DynamicResource Text.GitFlow}"/>
<controls:IconButton Grid.Column="2" Click="OpenNewBranch" Width="14" Height="14" Margin="0,0,2,0" Icon="{StaticResource Icon.Branch.Add}" ToolTip="{DynamicResource Text.Dashboard.NewBranch}"/>
</Grid>
<controls:Tree
Grid.Row="3"
x:Name="localBranchTree"
MaxHeight="300"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Auto"
LostFocus="OnTreeLostFocus"
SelectionChanged="OnTreeSelectionChanged">
<controls:Tree.ItemContainerStyle>
<Style TargetType="{x:Type controls:TreeItem}" BasedOn="{StaticResource Style.TreeItem}">
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
<EventSetter Event="MouseDoubleClick" Handler="OnTreeDoubleClick"/>
<EventSetter Event="ContextMenuOpening" Handler="OnTreeContextMenuOpening"/>
</Style>
</controls:Tree.ItemContainerStyle>
<controls:Tree.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
<Grid Height="24">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="16"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Path Grid.Column="0" x:Name="Icon" Width="10" Height="10" Data="{StaticResource Icon.Branch}"/>
<TextBlock Grid.Column="1" x:Name="Name" Text="{Binding Name}" Margin="4,0"/>
<controls:Badge Grid.Column="2" Margin="4,0" Label="{Binding UpstreamTrackStatus}"/>
<ToggleButton
Grid.Column="3"
x:Name="Filter"
Margin="4,0"
IsChecked="{Binding IsFiltered}"
Style="{StaticResource Style.ToggleButton.Filter}"
ToolTip="{DynamicResource Text.Filter}"
Checked="OnFilterChanged" Unchecked="OnFilterChanged"/>
</Grid>
<HierarchicalDataTemplate.Triggers>
<DataTrigger Binding="{Binding IsCurrent}" Value="True">
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Check}"/>
<Setter TargetName="Name" Property="FontWeight" Value="ExtraBold"/>
</DataTrigger>
<DataTrigger Binding="{Binding Type}" Value="{x:Static widgets:Dashboard+BranchNodeType.Folder}">
<Setter TargetName="Filter" Property="Visibility" Value="Collapsed"/>
</DataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Type}" Value="{x:Static widgets:Dashboard+BranchNodeType.Folder}"/>
<Condition Binding="{Binding IsExpanded, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type controls:TreeItem}}}" Value="True"/>
</MultiDataTrigger.Conditions>
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Folder.Open}"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Type}" Value="{x:Static widgets:Dashboard+BranchNodeType.Folder}"/>
<Condition Binding="{Binding IsExpanded, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type controls:TreeItem}}}" Value="False"/>
</MultiDataTrigger.Conditions>
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Folder.Fill}"/>
</MultiDataTrigger>
</HierarchicalDataTemplate.Triggers>
</HierarchicalDataTemplate>
</controls:Tree.ItemTemplate>
</controls:Tree>
<!-- REMOTES -->
<Grid Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.Remotes}"/>
<controls:IconButton Grid.Column="1" Click="OpenAddRemote" Width="14" Height="14" Margin="0,0,4,0" Icon="{StaticResource Icon.Remote.Add}" ToolTip="{DynamicResource Text.Dashboard.Remotes.Add}"/>
</Grid>
<controls:Tree
Grid.Row="5"
x:Name="remoteBranchTree"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Auto"
LostFocus="OnTreeLostFocus"
SelectionChanged="OnTreeSelectionChanged">
<controls:Tree.ItemContainerStyle>
<Style TargetType="{x:Type controls:TreeItem}" BasedOn="{StaticResource Style.TreeItem}">
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
<EventSetter Event="ContextMenuOpening" Handler="OnTreeContextMenuOpening"/>
</Style>
</controls:Tree.ItemContainerStyle>
<controls:Tree.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
<Grid Height="24">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="16"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Path Grid.Column="0" x:Name="Icon" Width="10" Height="10" Data="{StaticResource Icon.Branch}"/>
<TextBlock Grid.Column="1" x:Name="Name" Text="{Binding Name}" Margin="4,0"/>
<ToggleButton
Grid.Column="2"
x:Name="Filter"
Margin="4,0"
IsChecked="{Binding IsFiltered}"
Style="{StaticResource Style.ToggleButton.Filter}"
ToolTip="{DynamicResource Text.Filter}"
Checked="OnFilterChanged" Unchecked="OnFilterChanged"/>
</Grid>
<HierarchicalDataTemplate.Triggers>
<DataTrigger Binding="{Binding IsCurrent}" Value="True">
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Check}"/>
<Setter TargetName="Name" Property="FontWeight" Value="ExtraBold"/>
</DataTrigger>
<DataTrigger Binding="{Binding Type}" Value="{x:Static widgets:Dashboard+BranchNodeType.Folder}">
<Setter TargetName="Filter" Property="Visibility" Value="Collapsed"/>
</DataTrigger>
<DataTrigger Binding="{Binding Type}" Value="{x:Static widgets:Dashboard+BranchNodeType.Remote}">
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Remote}"/>
<Setter TargetName="Filter" Property="Visibility" Value="Collapsed"/>
</DataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Type}" Value="{x:Static widgets:Dashboard+BranchNodeType.Folder}"/>
<Condition Binding="{Binding IsExpanded, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type controls:TreeItem}}}" Value="True"/>
</MultiDataTrigger.Conditions>
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Folder.Open}"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Type}" Value="{x:Static widgets:Dashboard+BranchNodeType.Folder}"/>
<Condition Binding="{Binding IsExpanded, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type controls:TreeItem}}}" Value="False"/>
</MultiDataTrigger.Conditions>
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Folder.Fill}"/>
</MultiDataTrigger>
</HierarchicalDataTemplate.Triggers>
</HierarchicalDataTemplate>
</controls:Tree.ItemTemplate>
</controls:Tree>
<!-- TAGS -->
<ToggleButton
Grid.Row="6"
x:Name="tglTags"
Style="{StaticResource Style.ToggleButton.Expender}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.Tags}"/>
<TextBlock Grid.Column="1" x:Name="txtTagCount" FontWeight="DemiBold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.FG2}"/>
<controls:IconButton Grid.Column="2" Click="OpenNewTag" Width="14" Height="14" Margin="0,0,4,0" Icon="{StaticResource Icon.Tag.Add}" ToolTip="{DynamicResource Text.Dashboard.Tags.Add}"/>
</Grid>
</ToggleButton>
<DataGrid
Grid.Row="7"
x:Name="tagList"
RowHeight="24"
MaxHeight="200"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Visibility="{Binding ElementName=tglTags, Path=IsChecked, Converter={StaticResource BoolToCollapsed}}"
SelectionMode="Single"
SelectionUnit="FullRow"
LostFocus="OnTagsLostFocus"
SelectionChanged="OnTagSelectionChanged"
ContextMenuOpening="OnTagContextMenuOpening">
<DataGrid.Columns>
<DataGridTemplateColumn Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Path Grid.Column="0" Width="10" Height="10" Margin="16,0,8,0" Data="{StaticResource Icon.Tag}"/>
<TextBlock Grid.Column="1" Text="{Binding Name}"/>
<ToggleButton
Grid.Column="2"
IsChecked="{Binding IsFiltered, Mode=TwoWay}"
Margin="0,0,4,0"
Style="{StaticResource Style.ToggleButton.Filter}"
ToolTip="{DynamicResource Text.Filter}"
Checked="OnFilterChanged" Unchecked="OnFilterChanged"/>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<!-- SUBMODULES -->
<ToggleButton
Grid.Row="8"
x:Name="tglSubmodules"
Style="{StaticResource Style.ToggleButton.Expender}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.Submodules}"/>
<TextBlock Grid.Column="1" x:Name="txtSubmoduleCount" FontWeight="DemiBold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.FG2}"/>
<Button Grid.Column="2" Click="UpdateSubmodules" Background="Transparent" Margin="0,0,4,0" BorderThickness="0" ToolTip="{DynamicResource Text.Dashboard.Submodules.Update}">
<controls:Loading x:Name="iconUpdateSubmodule" Width="14" Height="14" />
</Button>
<controls:IconButton Grid.Column="3" Click="OpenAddSubmodule" Width="14" Height="14" Margin="4,0" Icon="{StaticResource Icon.Submodule}" ToolTip="{DynamicResource Text.Dashboard.Remotes.Add}"/>
</Grid>
</ToggleButton>
<DataGrid
Grid.Row="9"
x:Name="submoduleList"
RowHeight="24"
MaxHeight="100"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Visibility="{Binding ElementName=tglSubmodules, Path=IsChecked, Converter={StaticResource BoolToCollapsed}}"
SelectionMode="Single"
SelectionUnit="FullRow"
ContextMenuOpening="OnSubmoduleContextMenuOpening"
MouseDoubleClick="OnSubmoduleMouseDoubleClick">
<DataGrid.Columns>
<DataGridTemplateColumn Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Path Grid.Column="0" Width="10" Height="10" Margin="16,0,8,0" Data="{StaticResource Icon.Submodule}"/>
<TextBlock Grid.Column="1" Text="{Binding}"/>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<!-- SUBTREES -->
<ToggleButton
Grid.Row="10"
x:Name="tglSubTrees"
Style="{StaticResource Style.ToggleButton.Expender}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.SubTrees}"/>
<TextBlock Grid.Column="1" x:Name="txtSubTreeCount" FontWeight="DemiBold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.FG2}"/>
<controls:IconButton Grid.Column="2" Click="OpenAddSubTree" Width="14" Height="14" Margin="0,0,4,0" Icon="{StaticResource Icon.TreeAddNode}" ToolTip="{DynamicResource Text.Dashboard.SubTrees.Add}"/>
</Grid>
</ToggleButton>
<DataGrid
Grid.Row="11"
x:Name="subTreeList"
RowHeight="24"
MaxHeight="100"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Visibility="{Binding ElementName=tglSubTrees, Path=IsChecked, Converter={StaticResource BoolToCollapsed}}"
SelectionMode="Single"
SelectionUnit="FullRow"
ContextMenuOpening="OnSubTreeContextMenuOpening">
<DataGrid.Columns>
<DataGridTemplateColumn Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Path Grid.Column="0" Width="10" Height="10" Margin="16,0,8,0" Data="{StaticResource Icon.SubTree}"/>
<TextBlock Grid.Column="1" Text="{Binding Prefix}"/>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
<!-- Splitter -->
<GridSplitter
Grid.Column="1"
Width="1"
HorizontalAlignment="Center" VerticalAlignment="Stretch"
Background="{DynamicResource Brush.Border0}"/>
<!-- Right -->
<Grid Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" x:Name="mergeNavigator" Height="24" Background="{DynamicResource Brush.Conflict}" Visibility="Collapsed">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock
Grid.Column="0"
x:Name="txtConflictTip"
Margin="4,0"
FontWeight="DemiBold"
Foreground="{DynamicResource Brush.FG3}"/>
<Button
Grid.Column="1"
x:Name="btnResolve"
Click="GotoResolve"
Width="80"
Margin="2"
Content="{DynamicResource Text.Dashboard.Resolve}"
Background="{DynamicResource Brush.Window}"
BorderBrush="{DynamicResource Brush.FG1}"/>
<Button
Grid.Column="2"
x:Name="btnContinue"
Click="ContinueMerge"
Width="80"
Margin="2"
Content="{DynamicResource Text.Dashboard.Continue}"
Background="{DynamicResource Brush.Accent1}"
BorderBrush="{DynamicResource Brush.FG1}"/>
<Button
Grid.Column="3"
Click="AbortMerge"
Width="80"
Margin="2,2,4,2"
Content="{DynamicResource Text.Dashboard.Abort}"
Background="{DynamicResource Brush.Window}"
BorderBrush="{DynamicResource Brush.FG1}"/>
</Grid>
<controls:PageContainer Grid.Row="1" x:Name="pages"/>
</Grid>
</Grid>
<!-- Popup -->
<widgets:PopupPanel x:Name="popup" Grid.Row="1"/>
</Grid>
</UserControl>