-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathEventView.xaml
More file actions
23 lines (22 loc) · 1.71 KB
/
EventView.xaml
File metadata and controls
23 lines (22 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<UserControl x:Class="DXBindingExample.View.EventView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:v="clr-namespace:DXBindingExample.View"
xmlns:vm="clr-namespace:DXBindingExample.ViewModel"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignHeight="600" d:DesignWidth="800"
d:DataContext="{dxmvvm:ViewModelSource vm:EventViewModel}">
<UserControl.Resources>
<sys:String x:Key="loadedBindingStringFormat" xml:space="preserve">This message is shown with this binding: {0}</sys:String>
<sys:String x:Key="loadedBinding">Loaded="{DXEvent '$MessageBox.Show(`text`, Title)'}"</sys:String>
<sys:String x:Key="clickBindingStringFormat" xml:space="preserve">This message is shown with this binding: {0}</sys:String>
<sys:String x:Key="clickBinding">Click="{DXEvent '$MessageBox.Show(`text`, Title)'}"</sys:String>
</UserControl.Resources>
<StackPanel Orientation="Vertical" Loaded="{DXEvent '$MessageBox.Show($string.Format(@r(loadedBindingStringFormat), @r(loadedBinding)), Title)'}">
<Button Content="Show Message" Style="{StaticResource valueStyle}" HorizontalAlignment="Left"
Click="{DXEvent '$MessageBox.Show($string.Format(@r(clickBindingStringFormat), @r(clickBinding)), Title)'}"/>
</StackPanel>
</UserControl>