-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
83 lines (69 loc) · 4.35 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<dxc:DXWindow x:Class="PrintDocumentFromUIWpf.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxp="http://schemas.devexpress.com/winfx/2008/xaml/printing"
Title="MainWindow" dxc:ThemeManager.ThemeName="Azure"
Height="330" Width="280" Loaded="DXWindow_Loaded">
<dxc:DXWindow.Resources>
<BooleanToVisibilityConverter x:Key="booleanToVisibilityConverter" />
<DataTemplate x:Key="detailTemplate">
<dxe:TextEdit EditValue="{Binding Path=Content}" IsPrintingMode="True" Width="100" />
</DataTemplate>
<DataTemplate x:Key="reportHeaderTemplate">
<dxe:TextEdit EditValue="{Binding Path=Content.EditValue}" FontSize="20.25pt" Width="584" HorizontalContentAlignment="Center" IsPrintingMode="True" />
</DataTemplate>
<DataTemplate x:Key="reportFooterTemplate">
<dxe:TextEdit Text="{Binding Path=Content.EditValue}" FontSize="20.25pt" Width="584" HorizontalContentAlignment="Center" IsPrintingMode="True" />
</DataTemplate>
<DataTemplate x:Key="pageHeaderTemplate">
<dxe:TextEdit Text="{Binding Path=Content.EditValue}" FontSize="15.25pt" Width="400" IsPrintingMode="True" />
</DataTemplate>
<DataTemplate x:Key="pageFooterTemplate">
<StackPanel>
<dxe:TextEdit Text="{Binding Path=Content.Title}" FontSize="15.25pt" Width="500" IsPrintingMode="True" />
<dxe:TextEdit Visibility="{Binding Path=Content.PrintPageInfo, Converter={StaticResource booleanToVisibilityConverter}}"
dxp:ExportSettings.TargetType="PageNumber"
dxp:PageNumberExportSettings.Kind="NumberOfTotal"
dxp:PageNumberExportSettings.Format="Page {0} of {1}"
IsPrintingMode="True" />
</StackPanel>
</DataTemplate>
</dxc:DXWindow.Resources>
<StackPanel>
<GroupBox Header="Document Elements">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="100" />
</Grid.ColumnDefinitions>
<Label Margin="5">Report Header:</Label>
<dxe:TextEdit Name="teReportHeader" Grid.Column="2" Margin="5" />
<Label Grid.Row="1" Margin="5">Page Header:</Label>
<dxe:TextEdit Name="tePageHeader" Grid.Column="2" Grid.Row="1" Margin="5" />
<Label Grid.Row="2" Margin="5">Detail Content:</Label>
<dxe:TextEdit Name="teDetail" Grid.Column="2" Grid.Row="2" Margin="5" />
<Label Grid.Row="3" Margin="5">Page Footer:</Label>
<dxe:TextEdit Name="tePageFooter" Grid.Column="2" Grid.Row="3" Margin="5" />
<Label Grid.Row="4" Margin="5">Report Footer:</Label>
<dxe:TextEdit Name="teReportFooter" Grid.Column="2" Grid.Row="4" Margin="5" />
<Label Grid.Row="5" Margin="5">Detail Count:</Label>
<dxe:SpinEdit Name="seDetail" Grid.Column="2" Grid.Row="5" Margin="5" MinValue="0" IsFloatValue="False" IsTextEditable="False" />
<Label Grid.Row="6" Margin="5">Print Page Info:</Label>
<dxe:CheckEdit Name="cePageInfo" Grid.Column="2" Grid.Row="6" Margin="5" HorizontalAlignment="Center" />
</Grid>
</GroupBox>
<Button Width="100" Margin="5" Content="Print Preview" Click="btnPrint_Click" />
</StackPanel>
</dxc:DXWindow>