-
Notifications
You must be signed in to change notification settings - Fork 34
/
TextDiffView.xaml
63 lines (62 loc) · 3.46 KB
/
TextDiffView.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<UserControl x:Class="GitSharp.Demo.TextDiffView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Demo="clr-namespace:GitSharp.Demo"
MinHeight="50" MinWidth="200" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<UserControl.Resources>
<Demo:BlockTextConverterA x:Key="BlockTextConverterA"/>
<Demo:BlockTextConverterB x:Key="BlockTextConverterB"/>
<Demo:BlockColorConverterA x:Key="BlockColorConverterA"/>
<Demo:BlockColorConverterB x:Key="BlockColorConverterB"/>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="4" />
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ScrollViewer Grid.Column="0" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Hidden" ScrollChanged="OnScrollChanged" Name="m_scrollview_A">
<ListBox Name="ListA">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Loaded="StretchDataTemplate" Margin="-1">
<Border BorderBrush="DarkGray" BorderThickness="0,1,0,1" HorizontalAlignment="Stretch" Background="{Binding Converter={StaticResource BlockColorConverterA}}" ToolTip="{Binding EditWithRespectToA}">
<TextBlock Text="{Binding Converter={StaticResource BlockTextConverterA}}"/>
</Border>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>
<GridSplitter Grid.Column="1" ResizeBehavior="PreviousAndNext" HorizontalAlignment="Stretch"/>
<ScrollViewer Grid.Column="2" HorizontalScrollBarVisibility="Visible" Name="m_scrollview_B" ScrollChanged="OnScrollChanged">
<ListBox Name="ListB" >
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Loaded="StretchDataTemplate" Margin="-1">
<Border BorderBrush="DarkGray" BorderThickness="0,1,0,1" HorizontalAlignment="Stretch" Background="{Binding Converter={StaticResource BlockColorConverterB}}" ToolTip="{Binding EditWithRespectToA}">
<TextBlock Text="{Binding Converter={StaticResource BlockTextConverterB}}"/>
</Border>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>
</Grid>
<!--<ListBox Name="m_list" Grid.IsSharedSizeScope="True">
<ListBox.ItemTemplate>
<DataTemplate>
<Border BorderBrush="DarkGray" BorderThickness="1,0,1,1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="A"/>
<ColumnDefinition SharedSizeGroup="B"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding TextA}" Grid.Column="0"/>
<TextBlock Text="{Binding TextB}" Grid.Column="1"/>
</Grid>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>-->
</UserControl>