Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
64 lines (62 sloc) 3.46 KB
<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>