|
4 | 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 | 6 | xmlns:local="clr-namespace:SimpleStateMachineNodeEditor.View" |
| 7 | + xmlns:View="clr-namespace:SimpleStateMachineNodeEditor.View" |
| 8 | + xmlns:ViewModel="clr-namespace:SimpleStateMachineNodeEditor.ViewModel" |
7 | 9 | mc:Ignorable="d" |
8 | 10 | d:DesignHeight="450" d:DesignWidth="800" Focusable="True" AllowDrop="True" ClipToBounds="True"> |
| 11 | + |
9 | 12 | <Canvas x:Name="Canvas" Background="{StaticResource ColorNodesCanvasBackground}" > |
10 | 13 |
|
11 | 14 | <local:ViewSelector x:Name="Selector" Panel.ZIndex="999"/> |
12 | 15 | <local:ViewCutter x:Name="Cutter" Panel.ZIndex="999"/> |
13 | | - |
14 | | - <ItemsControl x:Name="Nodes" > |
| 16 | + |
| 17 | + <ItemsControl Panel.ZIndex="0"> |
| 18 | + <ItemsControl.RenderTransform> |
| 19 | + <TransformGroup x:Name="TransformGroup"> |
| 20 | + <ScaleTransform x:Name="Scale" ScaleX="1" ScaleY="1" /> |
| 21 | + <SkewTransform/> |
| 22 | + <RotateTransform Angle="0" /> |
| 23 | + <TranslateTransform x:Name="Translate"/> |
| 24 | + </TransformGroup> |
| 25 | + </ItemsControl.RenderTransform> |
| 26 | + <ItemsControl.ItemsPanel> |
| 27 | + <ItemsPanelTemplate> |
| 28 | + <Grid Background="{x:Null}"> |
| 29 | + </Grid> |
| 30 | + </ItemsPanelTemplate> |
| 31 | + </ItemsControl.ItemsPanel> |
| 32 | + <ItemsControl.Resources > |
| 33 | + <DataTemplate DataType="{x:Type ViewModel:ViewModelConnect}"> |
| 34 | + <View:ViewConnect ViewModel="{Binding}"/> |
| 35 | + </DataTemplate> |
| 36 | + <DataTemplate DataType="{x:Type ViewModel:ViewModelNode}"> |
| 37 | + <View:ViewNode ViewModel="{Binding}" /> |
| 38 | + </DataTemplate> |
| 39 | + </ItemsControl.Resources> |
| 40 | + <ItemsControl.ItemsSource> |
| 41 | + <CompositeCollection> |
| 42 | + <CollectionContainer x:Name="Connects" /> |
| 43 | + <CollectionContainer x:Name="Nodes"/> |
| 44 | + </CompositeCollection> |
| 45 | + </ItemsControl.ItemsSource> |
| 46 | + </ItemsControl> |
| 47 | + |
| 48 | + |
| 49 | + <!--<ItemsControl x:Name="Nodes" > |
15 | 50 | <ItemsControl.RenderTransform> |
16 | 51 | <TransformGroup x:Name="TransformGroup"> |
17 | 52 | <ScaleTransform x:Name="Scale" ScaleX="1" ScaleY="1" /> |
|
28 | 63 | </ItemsControl.ItemsPanel> |
29 | 64 | <ItemsControl.ItemTemplate> |
30 | 65 | <DataTemplate> |
31 | | - <local:ViewNode ViewModel="{Binding}" /> |
| 66 | + <View:ViewNode ViewModel="{Binding}" /> |
32 | 67 | </DataTemplate> |
33 | 68 | </ItemsControl.ItemTemplate> |
34 | 69 | </ItemsControl> |
35 | 70 |
|
| 71 | + |
| 72 | + |
36 | 73 | <ItemsControl x:Name="Connects" > |
37 | 74 | <ItemsControl.ItemsPanel> |
38 | 75 | <ItemsPanelTemplate> |
|
42 | 79 | </ItemsControl.ItemsPanel> |
43 | 80 | <ItemsControl.ItemTemplate> |
44 | 81 | <DataTemplate> |
45 | | - <local:ViewConnect ViewModel="{Binding}"/> |
| 82 | + <View:ViewConnect ViewModel="{Binding}"/> |
46 | 83 | </DataTemplate> |
47 | 84 | </ItemsControl.ItemTemplate> |
48 | | - </ItemsControl> |
| 85 | + </ItemsControl>--> |
49 | 86 |
|
50 | 87 | </Canvas> |
51 | 88 | <UserControl.ContextMenu > |
|
0 commit comments