Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: c0faec8114
Fetching contributors…

Cannot retrieve contributors at this time

121 lines (109 sloc) 6.784 kB
<UserControl x:Class="GG.UserControls.ChangesetHistory"
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:userControls="clr-namespace:GG.UserControls"
xmlns:converters="clr-namespace:GG.Converters"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="600"
d:DataContext="{d:DesignData Source=../DesignData/ChangesetHistory.xaml}">
<UserControl.Resources>
<userControls:ChangesetHistoryContextMenu x:Key="changesetHistoryContextMenu" />
<converters:IsHeadToFontWeightConverter x:Key="isHeadToFontWeightConverter" />
<converters:IsHeadToTextDecorationsConverter x:Key="isHeadToTextDecorationsConverter" />
</UserControl.Resources>
<Grid x:Name="ChangesetHistoryContainer">
<DataGrid CanUserSortColumns="False"
CanUserAddRows="False"
CanUserDeleteRows="False"
CanUserResizeColumns="True"
CanUserReorderColumns="True"
SelectionUnit="FullRow"
ScrollViewer.CanContentScroll="True"
ScrollViewer.ScrollChanged="ChangesetHistoryGrid_ScrollChanged"
ScrollViewer.VerticalScrollBarVisibility="Auto"
SelectionMode="Single"
HeadersVisibility="Column"
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.VirtualizationMode="Recycling"
ItemsSource="{Binding Commits}"
x:Name="ChangesetHistoryGrid"
AutoGenerateColumns="False"
Tag="{Binding}"
Grid.Row="0"
ContextMenu="{StaticResource changesetHistoryContextMenu}">
<DataGrid.InputBindings>
<KeyBinding Key="C" Modifiers="Control"
Command="{Binding CopyHashCommand}"
CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType=DataGrid}}" />
<KeyBinding Key="S" Modifiers="Control"
Command="{Binding ExportPatchCommand}"
CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType=DataGrid}}" />
</DataGrid.InputBindings>
<DataGrid.Columns>
<DataGridTemplateColumn Header="Graph" Width="128">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate></DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Description" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<WrapPanel>
<ListBox ItemsSource="{Binding DisplayTags}" Style="{StaticResource DisplayTagsBlueStyle}" IsHitTestVisible="False" />
<ListBox ItemsSource="{Binding Tags}" DisplayMemberPath="Name" Style="{StaticResource DisplayTagsOrangeStyle}" IsHitTestVisible="False" />
<TextBlock Text="{Binding Path=ShortDescription}"
VerticalAlignment="Center"
FontWeight="{Binding IsHead, Converter={StaticResource isHeadToFontWeightConverter}}"
TextDecorations="{Binding IsHead, Converter={StaticResource isHeadToTextDecorationsConverter}}" />
</WrapPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Date" Width="128">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=FormattedDate}"
FontWeight="{Binding IsHead, Converter={StaticResource isHeadToFontWeightConverter}}"
TextDecorations="{Binding IsHead, Converter={StaticResource isHeadToTextDecorationsConverter}}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Author" Width="224">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Author}"
FontWeight="{Binding IsHead, Converter={StaticResource isHeadToFontWeightConverter}}"
TextDecorations="{Binding IsHead, Converter={StaticResource isHeadToTextDecorationsConverter}}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Hash" Width="64">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=HashShort}"
FontWeight="{Binding IsHead, Converter={StaticResource isHeadToFontWeightConverter}}"
TextDecorations="{Binding IsHead, Converter={StaticResource isHeadToTextDecorationsConverter}}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<ScrollViewer Margin="0,24,0,0"
Grid.Row="0"
Width="128"
ScrollViewer.VerticalScrollBarVisibility="Hidden"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
HorizontalAlignment="Left"
VerticalAlignment="Top"
x:Name="GraphScrollViewer"
IsHitTestVisible="True">
<Canvas Width="128"
HorizontalAlignment="Left"
VerticalAlignment="Top"
x:Name="Graph" />
</ScrollViewer>
</Grid>
</UserControl>
Jump to Line
Something went wrong with that request. Please try again.