Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (54 sloc) 3.31 KB
<Window 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:graphsharp="clr-namespace:GraphSharp.Controls;assembly=GraphSharp.Controls" xmlns:local="clr-namespace:SeeGit"
xmlns:zoom="clr-namespace:WPFExtensions.Controls;assembly=WPFExtensions"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:view="clr-namespace:SeeGit.Views"
xmlns:extbehaviour="clr-namespace:WPFExtensions.AttachedBehaviours;assembly=WPFExtensions" x:Class="SeeGit.MainWindow"
Title="GraphSharpDemo" Height="465" Width="708" mc:Ignorable="d">
<Window.Resources>
<DataTemplate x:Key="commitDetailsTemplate" DataType="{x:Type local:CommitVertex}">
<StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="{Binding Description, Mode=OneWay}" Foreground="White" />
</StackPanel>
</DataTemplate>
<Style TargetType="{x:Type graphsharp:VertexControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type graphsharp:VertexControl}">
<view:CommitVertexView Model="{Binding}" />
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="extbehaviour:DragBehaviour.IsDragEnabled" Value="True" />
<Setter Property="extbehaviour:DragBehaviour.X"
Value="{Binding RelativeSource={RelativeSource Self},Path=(graphsharp:GraphCanvas.X),Mode=TwoWay}" />
<Setter Property="extbehaviour:DragBehaviour.Y"
Value="{Binding RelativeSource={RelativeSource Self},Path=(graphsharp:GraphCanvas.Y),Mode=TwoWay}" />
</Style>
</Window.Resources>
<Grid d:DataContext="{ d:DesignInstance {x:Type local:DesignTimeMainWindowViewModel}, IsDesignTimeCreatable=True}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical" Grid.Row="0">
<StackPanel Orientation="Horizontal" Background="Black" HorizontalAlignment="Stretch" Margin="0">
<Label VerticalAlignment="Center" VerticalContentAlignment="Center" Foreground="White" FontSize="10"
FontFamily="Verdana" FontWeight="Bold" Margin="0,0,0,0" Content="Repository Path:" />
<Label VerticalAlignment="Center" VerticalContentAlignment="Center" Foreground="White" FontSize="10"
FontFamily="Verdana" FontWeight="Bold" Margin="0,0,0,0" Content="{Binding Path=RepositoryPath}" />
<Button Background="Gray" Foreground="White" HorizontalAlignment="Right" Margin="10 2 0 2" Padding="3"
Click="OnChooseRepository">
Browse For a Repository...
</Button>
</StackPanel>
</StackPanel>
<zoom:ZoomControl Grid.Row="1" Zoom="0.2" ZoomBoxOpacity="0.5" Background="#ff656565">
<local:RepositoryGraphLayout x:Name="graphLayout" Margin="10" Graph="{Binding Graph}"
LayoutAlgorithmType="{Binding LayoutAlgorithmType, Mode=OneWay}" OverlapRemovalAlgorithmType="FSA"
FlowDirection="LeftToRight" />
</zoom:ZoomControl>
</Grid>
</Window>