-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainView.xaml
37 lines (35 loc) · 2.12 KB
/
MainView.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
<UserControl x:Class="Example.View.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ViewModel="clr-namespace:Example.ViewModel"
xmlns:View="clr-namespace:Example.View"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignHeight="500" d:DesignWidth="600"
DataContext="{dxmvvm:ViewModelSource ViewModel:MainViewModel}">
<dxmvvm:Interaction.Behaviors>
<dx:DXMessageBoxService/>
</dxmvvm:Interaction.Behaviors>
<Grid x:Name="LayoutRoot" Background="White">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Button Content="Change Parameter1" Command="{Binding ChangeParameter1Command}"/>
<Button Content="Change Parameter2" Command="{Binding ChangeParameter2Command}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Border BorderThickness="1" BorderBrush="Black" Margin="10" Width="300" Height="100">
<View:ChildView1 dxmvvm:ViewModelExtensions.ParentViewModel="{Binding DataContext, ElementName=LayoutRoot}"
dxmvvm:ViewModelExtensions.Parameter="{Binding DataContext.Parameter1, ElementName=LayoutRoot}"/>
</Border>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Border BorderThickness="1" BorderBrush="Black" Margin="10" Width="300" Height="100">
<View:ChildView2 dxmvvm:ViewModelExtensions.ParentViewModel="{Binding DataContext, ElementName=LayoutRoot}"
dxmvvm:ViewModelExtensions.Parameter="{Binding DataContext.Parameter2, ElementName=LayoutRoot}"/>
</Border>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>