Tree graph commands in process
This commit is contained in:
78
StructureHelper/Windows/TreeGraph/TreeGraphView.xaml
Normal file
78
StructureHelper/Windows/TreeGraph/TreeGraphView.xaml
Normal file
@@ -0,0 +1,78 @@
|
||||
<Window x:Class="StructureHelper.Windows.TreeGraph.TreeGraphView"
|
||||
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:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
|
||||
xmlns:local="clr-namespace:StructureHelper.Windows.TreeGraph"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance local:TreeGraphViewModel}"
|
||||
Title="StructureHelper" Height="700"
|
||||
Width="1000" MinHeight="400" MinWidth="600">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="350"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="50"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TreeView Grid.Row="0" Grid.Column="0" Margin="5"
|
||||
ItemsSource="{Binding Nodes}">
|
||||
<TreeView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
</TreeView>
|
||||
<Grid Grid.Row="1" Grid.Column="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="50"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button Grid.Column="0" Margin="5" Content="Get Y"
|
||||
Background="Goldenrod"
|
||||
Command="{Binding GetYCommand}"/>
|
||||
<Button Grid.Column="1" Margin="5" Content="ScaleX"
|
||||
Background="Turquoise"
|
||||
Command="{Binding ScaleCommand}"
|
||||
CommandParameter="x"/>
|
||||
<Button Grid.Column="2" Margin="5" Content="ScaleY"
|
||||
Background="Turquoise"
|
||||
Command="{Binding ScaleCommand}"
|
||||
CommandParameter="y"/>
|
||||
<Button Grid.Column="3" Margin="5" Content="limX"
|
||||
Background="DodgerBlue"
|
||||
Command="{Binding LimitCommand}"
|
||||
CommandParameter="x"/>
|
||||
<Button Grid.Column="4" Margin="5" Content="limY"
|
||||
Background="DodgerBlue"
|
||||
Command="{Binding LimitCommand}"
|
||||
CommandParameter="y"/>
|
||||
<Button Grid.Column="5" Margin="5" Content="Edit"
|
||||
Background="LightYellow"
|
||||
Command="{Binding EditCommand}"/>
|
||||
<Button Grid.Column="6" Margin="5" Content="Delete"
|
||||
Background="LightPink"
|
||||
Command="{Binding DeleteCommand}"/>
|
||||
</Grid>
|
||||
<lvc:CartesianChart Grid.Row="0" Grid.Column="1" Grid.RowSpan="2"
|
||||
Series="{Binding SeriesCollection}" Margin="5">
|
||||
<lvc:CartesianChart.AxisY>
|
||||
<lvc:Axis Title="Y"></lvc:Axis>
|
||||
</lvc:CartesianChart.AxisY>
|
||||
<lvc:CartesianChart.AxisX>
|
||||
<lvc:Axis Title="X" Labels="{Binding Labels}"></lvc:Axis>
|
||||
</lvc:CartesianChart.AxisX>
|
||||
</lvc:CartesianChart>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user