forked from Wouterdek/NodeNetwork
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
77 lines (76 loc) · 6.57 KB
/
MainWindow.xaml
File metadata and controls
77 lines (76 loc) · 6.57 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<Window x:Class="ExampleCodeGenApp.Views.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ExampleCodeGenApp"
xmlns:views="clr-namespace:NodeNetwork.Views;assembly=NodeNetwork"
xmlns:nodeList="clr-namespace:NodeNetwork.Toolkit.NodeList;assembly=NodeNetworkToolkit"
xmlns:views1="clr-namespace:ExampleCodeGenApp.Views"
xmlns:viewModels="clr-namespace:ExampleCodeGenApp.ViewModels"
xmlns:nodes="clr-namespace:ExampleCodeGenApp.ViewModels.Nodes"
xmlns:converters="clr-namespace:ExampleCodeGenApp.Views.Converters"
xmlns:breadcrumbBar="clr-namespace:NodeNetwork.Toolkit.BreadcrumbBar;assembly=NodeNetworkToolkit"
mc:Ignorable="d"
Title="MainWindow" Height="550" Width="825">
<Window.Resources>
<converters:TypeVisibilityCheck x:Key="TypeCheckToVisibility"/>
<ContextMenu x:Key="nodeMenu" x:Shared="True">
<MenuItem x:Name="groupNodesButton" Header="Group nodes"/>
<MenuItem x:Name="ungroupNodesButton" Header="Ungroup nodes" Visibility="{Binding Converter={StaticResource TypeCheckToVisibility}, ConverterParameter={x:Type nodes:GroupNodeViewModel}}"/>
<MenuItem x:Name="openGroupButton" Header="Open group" Visibility="{Binding Converter={StaticResource TypeCheckToVisibility}, ConverterParameter={x:Type nodes:GroupNodeViewModel}}"/>
</ContextMenu>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="200"/>
</Grid.ColumnDefinitions>
<breadcrumbBar:BreadcrumbBarView x:Name="breadcrumbBar" Grid.Row="0" Grid.ColumnSpan="5" MinHeight="30"/>
<Grid Grid.Row="1" Grid.Column="0">
<nodeList:NodeListView x:Name="nodeList" Margin="0,0,0,36"/>
<StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="10, 0, 10, 8">
<Button Name="autoLayoutButton">Auto-layout</Button>
<Button Name="startAutoLayoutLiveButton" Margin="0, 5, 0, 0">Start live auto-layout</Button>
<Button Name="stopAutoLayoutLiveButton" Margin="0, 5, 0, 0">Stop live auto-layout</Button>
</StackPanel>
</Grid>
<GridSplitter Grid.Row="1" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
<views:NetworkView x:Name="network" Grid.Row="1" Grid.Column="2">
<views:NetworkView.Resources>
<Style TargetType="views:NodeView">
<Setter Property="ContextMenu" Value="{StaticResource nodeMenu}" />
</Style>
</views:NetworkView.Resources>
<views:NetworkView.NetworkBackground>
<DrawingBrush TileMode="Tile" Viewport="0,0,96,96" ViewportUnits="Absolute" Viewbox="0,0,96,96" ViewboxUnits="Absolute">
<DrawingBrush.Drawing>
<GeometryDrawing Brush="Black">
<GeometryDrawing.Geometry>
<Geometry>M 77.000,37.000 L 59.000,37.000 L 59.000,19.000 L 77.000,19.000 L 77.000,37.000 Z M 77.000,57.000 L 59.000,57.000 L 59.000,38.000 L 77.000,38.000 L 77.000,57.000 Z M 77.000,76.000 L 59.000,76.000 L 59.000,58.000 L 77.000,58.000 L 77.000,76.000 Z M 77.000,94.000 L 59.000,94.000 L 59.000,77.000 L 77.000,77.000 L 77.000,94.000 Z M 39.000,94.000 L 39.000,77.000 L 58.000,77.000 L 58.000,94.000 L 39.000,94.000 Z M 20.000,94.000 L 20.000,77.000 L 38.000,77.000 L 38.000,94.000 L 20.000,94.000 Z M 2.000,94.000 L 2.000,77.000 L 19.000,77.000 L 19.000,94.000 L 2.000,94.000 Z M 2.000,58.000 L 19.000,58.000 L 19.000,76.000 L 2.000,76.000 L 2.000,58.000 Z M 2.000,38.000 L 19.000,38.000 L 19.000,57.000 L 2.000,57.000 L 2.000,38.000 Z M 2.000,19.000 L 19.000,19.000 L 19.000,37.000 L 2.000,37.000 L 2.000,19.000 Z M 38.000,19.000 L 38.000,37.000 L 20.000,37.000 L 20.000,19.000 L 38.000,19.000 Z M 39.000,57.000 L 39.000,38.000 L 58.000,38.000 L 58.000,57.000 L 39.000,57.000 Z M 39.000,58.000 L 58.000,58.000 L 58.000,76.000 L 39.000,76.000 L 39.000,58.000 Z M 20.000,57.000 L 20.000,38.000 L 38.000,38.000 L 38.000,57.000 L 20.000,57.000 Z M 38.000,58.000 L 38.000,76.000 L 20.000,76.000 L 20.000,58.000 L 38.000,58.000 Z M 58.000,19.000 L 58.000,37.000 L 39.000,37.000 L 39.000,19.000 L 58.000,19.000 Z M 96.000,19.000 L 96.000,18.000 L 78.000,18.000 L 78.000,0.000 L 77.000,0.000 L 77.000,18.000 L 59.000,18.000 L 59.000,0.000 L 58.000,0.000 L 58.000,18.000 L 39.000,18.000 L 39.000,0.000 L 38.000,0.000 L 38.000,18.000 L 20.000,18.000 L 20.000,0.000 L 19.000,0.000 L 19.000,18.000 L 2.000,18.000 L 2.000,0.000 L 0.000,0.000 L 0.000,18.000 L 0.000,19.000 L 0.000,37.000 L 0.000,38.000 L 0.000,57.000 L 0.000,58.000 L 0.000,76.000 L 0.000,77.000 L 0.000,94.000 L 0.000,96.000 L 2.000,96.000 L 19.000,96.000 L 20.000,96.000 L 38.000,96.000 L 39.000,96.000 L 58.000,96.000 L 59.000,96.000 L 77.000,96.000 L 78.000,96.000 L 96.000,96.000 L 96.000,94.000 L 78.000,94.000 L 78.000,77.000 L 96.000,77.000 L 96.000,76.000 L 78.000,76.000 L 78.000,58.000 L 96.000,58.000 L 96.000,57.000 L 78.000,57.000 L 78.000,38.000 L 96.000,38.000 L 96.000,37.000 L 78.000,37.000 L 78.000,19.000 L 96.000,19.000 Z</Geometry>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingBrush.Drawing>
</DrawingBrush>
</views:NetworkView.NetworkBackground>
</views:NetworkView>
<GridSplitter Grid.Row="1" Grid.Column="3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
<Grid Grid.Row="1" Grid.Column="4">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="5"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<views1:CodePreviewView Grid.Row="0" x:Name="codePreviewView"/>
<GridSplitter Grid.Row="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
<views1:CodeSimView Grid.Row="2" x:Name="codeSimView"/>
</Grid>
</Grid>
</Window>