-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
50 lines (50 loc) · 2.51 KB
/
MainWindow.xaml
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
<dx:ThemedWindow
x:Class="dxSample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxdiag="http://schemas.devexpress.com/winfx/2008/xaml/diagram"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:local="clr-namespace:dxSample"
Width="1000"
Height="800"
Title="MainWindow">
<dx:ThemedWindow.DataContext>
<local:ViewModel />
</dx:ThemedWindow.DataContext>
<Grid>
<dxdiag:DiagramDesignerControl SelectedStencils="BasicShapes, BasicFlowchartShapes">
<dxmvvm:Interaction.Behaviors>
<dxdiag:DiagramDataBindingBehavior
ConnectorFromMember="From"
ConnectorsSource="{Binding Connections}"
ConnectorToMember="To"
CustomLayoutItems="DiagramDataBindingBehavior_CustomLayoutItems"
ItemsSource="{Binding Items}"
KeyMember="Id">
<dxdiag:DiagramDataBindingBehavior.TemplateDiagram>
<dxdiag:DiagramControl
CanvasSizeMode="Fill"
SelectedStencils="TemplateDesigner, BasicShapes"
ShowPageBreaks="false">
<dxdiag:DiagramShape
Width="100"
Height="75"
Anchors="Left, Top"
Position="90,60"
Shape="BasicShapes.Rectangle">
<dxdiag:DiagramShape.Bindings>
<dxdiag:DiagramBinding Expression="Position" PropertyName="Content" />
<dxdiag:DiagramBinding
Expression="Position"
Mode="TwoWay"
PropertyName="Position" />
</dxdiag:DiagramShape.Bindings>
</dxdiag:DiagramShape>
</dxdiag:DiagramControl>
</dxdiag:DiagramDataBindingBehavior.TemplateDiagram>
</dxdiag:DiagramDataBindingBehavior>
</dxmvvm:Interaction.Behaviors>
</dxdiag:DiagramDesignerControl>
</Grid>
</dx:ThemedWindow>