-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
42 lines (40 loc) · 1.98 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
<dx:ThemedWindow x:Class="PassDataFromViewModelToReport.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxp="http://schemas.devexpress.com/winfx/2008/xaml/printing"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:models="clr-namespace:PassDataFromViewModelToReport.Models"
Title="MainWindow" Height="450" Width="800">
<dx:ThemedWindow.DataContext>
<models:MainViewModel />
</dx:ThemedWindow.DataContext>
<dxmvvm:Interaction.Behaviors>
<dx:DialogService>
<dx:DialogService.ViewTemplate>
<DataTemplate>
<dxp:DocumentPreviewControl RequestDocumentCreation="True"
DocumentSource="{Binding Report}" />
</DataTemplate>
</dx:DialogService.ViewTemplate>
</dx:DialogService>
</dxmvvm:Interaction.Behaviors>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<dxg:GridControl ItemsSource="{Binding Employees}"
SelectedItem="{Binding SelectedEmployee, Mode=TwoWay}"
SelectionMode="Row"
AutoGenerateColumns="AddNew"
Margin="12,12,12,0">
<dxg:GridControl.View>
<dxg:TableView AllowEditing="False" />
</dxg:GridControl.View>
</dxg:GridControl>
<Button Content="Show Preview" Command="{Binding ShowPrintPreviewCommand}"
Grid.Row="1" Margin="12" />
</Grid>
</dx:ThemedWindow>