/
App.xaml
65 lines (65 loc) · 4.61 KB
/
App.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
<Application x:Class="CustomReportWizard.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:CustomReportWizard"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
StartupUri="MainWindow.xaml">
<Application.Resources>
<DataTemplate x:Key="{x:Type local:ChoosePageSettingsPageViewModel}">
<Grid VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<dxlc:LayoutControl Grid.Column="1">
<dxlc:LayoutGroup Orientation="Vertical">
<dxlc:LayoutItem Label="Orientation: " LabelVerticalAlignment="Top">
<UniformGrid Columns="2" Rows="1" Grid.Column="2" Margin="0,0,0,12">
<RadioButton Content="Portrait" IsChecked="{Binding Portrait, Mode=TwoWay}" />
<RadioButton Content="Landscape" IsChecked="{Binding Portrait, Converter={dxmvvm:BooleanNegationConverter}}" />
</UniformGrid>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="Paper Kind: " LabelVerticalAlignment="Top" >
<StackPanel Orientation="Vertical" Grid.Column="2" Grid.Row="2" Margin="0,0,0,12">
<dxe:ComboBoxEdit DisplayMember="DisplayName" IsTextEditable="False"
ItemsSource="{Binding AvailablePaperKinds}" EditValue="{Binding SelectedPaperKind, UpdateSourceTrigger=PropertyChanged}">
<dxe:ComboBoxEdit.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding DisplayName}" />
<TextBlock Text="{Binding SizeText}" Foreground="LightGray" />
</StackPanel>
</DataTemplate>
</dxe:ComboBoxEdit.ItemTemplate>
</dxe:ComboBoxEdit>
<TextBlock Text="{Binding SelectedPaperKind.SizeText}" Foreground="Gray" />
</StackPanel>
</dxlc:LayoutItem>
<dxlc:LayoutGroup Orientation="Horizontal" >
<dxlc:LayoutGroup Orientation="Vertical" >
<dxlc:LayoutItem Label="Left Margin:">
<dxe:SpinEdit EditValueType="{x:Type sys:Int32}" EditValue="{Binding LeftMargin, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="Top Margin:" >
<dxe:SpinEdit EditValueType="{x:Type sys:Int32}" EditValue="{Binding TopMargin, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
<dxlc:LayoutGroup Margin="24,0,0,0" ItemLabelsAlignment="Local" Orientation="Vertical" >
<dxlc:LayoutItem Label="Right Margin:" >
<dxe:SpinEdit EditValueType="{x:Type sys:Int32}" EditValue="{Binding RightMargin, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="Bottom Margin:" >
<dxe:SpinEdit EditValueType="{x:Type sys:Int32}" EditValue="{Binding BottomMargin, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
</dxlc:LayoutGroup>
</dxlc:LayoutGroup>
</dxlc:LayoutControl>
</Grid>
</DataTemplate>
</Application.Resources>
</Application>