This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
/
MainWindow.xaml
34 lines (34 loc) · 1.63 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
<Window x:Class="MessageBoxServiceCodeExample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:MessageBoxServiceCodeExample"
xmlns:View="clr-namespace:MessageBoxServiceCodeExample.View"
xmlns:mvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
Title="MainWindow" Height="350" Width="525">
<Window.DataContext>
<local:MainViewModel/>
</Window.DataContext>
<mvvm:Interaction.Behaviors>
<dx:DXMessageBoxService/>
<dx:DialogService DialogWindowStartupLocation="CenterOwner">
<dx:DialogService.ViewTemplate>
<DataTemplate>
<View:DialogView/>
</DataTemplate>
</dx:DialogService.ViewTemplate>
<dx:DialogService.DialogStyle>
<Style TargetType="dx:DXDialogWindow">
<Setter Property="SizeToContent" Value="WidthAndHeight"/>
</Style>
</dx:DialogService.DialogStyle>
</dx:DialogService>
</mvvm:Interaction.Behaviors>
<Grid>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Margin="8" Content="Show Message Box" Command="{Binding ShowMessageBoxCommand}"/>
<Button Margin="8" Content="Show Dialog" Command="{Binding ShowDialogCommand}"/>
</StackPanel>
</Grid>
</Window>