forked from MarcelRaschke/PostSharp.Samples
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainWindow.xaml
54 lines (54 loc) · 3.43 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
<Window x:Class="PostSharp.Samples.Xaml.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xaml="clr-namespace:PostSharp.Samples.Xaml"
xmlns:controls="clr-namespace:PostSharp.Patterns.Model.Controls;assembly=PostSharp.Patterns.Xaml"
Title="Contact Form" Height="292.584" Width="352.753"
x:Name="Window">
<Window.DataContext>
<xaml:CustomerViewModel />
</Window.DataContext>
<DockPanel>
<ToolBarTray DockPanel.Dock="Top">
<ToolBar>
<Button Name="SaveButton" Command="{Binding ElementName=Window, Path=SaveCommand}">Save</Button>
<controls:UndoButton />
<controls:RedoButton />
</ToolBar>
</ToolBarTray>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="29*" />
<ColumnDefinition Width="316*" />
</Grid.ColumnDefinitions>
<Label Content="First Name:" HorizontalAlignment="Left" Margin="10,62,0,0" VerticalAlignment="Top"
Grid.ColumnSpan="2" />
<TextBox HorizontalAlignment="Left" Height="23" Margin="97.846,62,0,0" TextWrapping="Wrap"
Text="{Binding Path=Customer.FirstName, ValidatesOnExceptions=True}" VerticalAlignment="Top"
Width="189" Grid.Column="1" />
<Label Content="Last Name:" HorizontalAlignment="Left" Margin="10,88,0,0" VerticalAlignment="Top"
Grid.ColumnSpan="2" />
<TextBox HorizontalAlignment="Left" Height="23" Margin="97.846,92,0,0" TextWrapping="Wrap"
Text="{Binding Path=Customer.LastName, ValidatesOnExceptions=True}" VerticalAlignment="Top"
Width="189" Grid.Column="1" />
<Label Content="Principal Address:" HorizontalAlignment="Left" Margin="10,119,0,0" VerticalAlignment="Top"
RenderTransformOrigin="-0.105,-0.462" Grid.ColumnSpan="2" />
<ComboBox HorizontalAlignment="Left" Margin="97.846,120,0,0" VerticalAlignment="Top" Width="189"
ItemsSource="{Binding Path=Customer.Addresses}"
SelectedValue="{Binding Path=Customer.PrincipalAddress}" DisplayMemberPath="FullAddress"
Grid.Column="1" />
<xaml:FancyTextBlock HorizontalAlignment="Left" Margin="10,15,0,0" Text="{Binding Path=FullName}"
VerticalAlignment="Top" Width="214" Grid.ColumnSpan="2" />
<Label Content="Line1:" HorizontalAlignment="Left" Margin="11.846,150,0,0" VerticalAlignment="Top"
Grid.Column="1" />
<TextBox HorizontalAlignment="Left" Height="23" Margin="97.846,154,0,0" TextWrapping="Wrap"
Text="{Binding Path=Customer.PrincipalAddress.Line1, ValidatesOnExceptions=True}"
VerticalAlignment="Top" Width="189" Grid.Column="1" />
<Label Content="Town:" HorizontalAlignment="Left" Margin="12.846,176,0,0" VerticalAlignment="Top"
Grid.Column="1" />
<TextBox HorizontalAlignment="Left" Height="23" Margin="97.846,182,0,0" TextWrapping="Wrap"
Text="{Binding Path=Customer.PrincipalAddress.Town, ValidatesOnExceptions=True}"
VerticalAlignment="Top" Width="189" Grid.Column="1" />
</Grid>
</DockPanel>
</Window>