1 <Window x:Class="EditingCollectionsSample.ChangeItemWindow"
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4 Title="Add or Edit an Item" Height="200" Width="300"
6 <StackPanel Margin="10" Width="250">
8 <Style TargetType="HeaderedContentControl">
9 <Setter Property="Margin" Value="2"/>
10 <Setter Property="Focusable" Value="False"/>
11 <Setter Property="Template">
13 <ControlTemplate TargetType="HeaderedContentControl">
14 <DockPanel LastChildFill="False">
15 <ContentPresenter ContentSource="Header" DockPanel.Dock="Left"
16 Focusable="False" VerticalAlignment="Center"/>
17 <ContentPresenter ContentSource="Content" Margin="5,0,0,0"
18 DockPanel.Dock="Right" VerticalAlignment="Center"/>
26 <Style TargetType="Button">
27 <Setter Property="Width" Value="100"/>
28 <Setter Property="Margin" Value="10,15,15,15"/>
31 </StackPanel.Resources>
33 <HeaderedContentControl Header="Description">
34 <TextBox Width="150" Text="{Binding Path=Description, Mode=TwoWay}"/>
35 </HeaderedContentControl>
36 <HeaderedContentControl Header="Price">
37 <TextBox Width="150" Text="{Binding Path=Price, Mode=TwoWay}"/>
38 </HeaderedContentControl>
39 <HeaderedContentControl Header="Date Offer Ends">
40 <TextBox Width="150" Text="{Binding Path=OfferExpires, StringFormat=d, Mode=TwoWay}"/>
41 </HeaderedContentControl>
42 <StackPanel Orientation="Horizontal">
43 <Button IsDefault="True" Click="Submit_Click">_Submit</Button>
44 <Button IsCancel="True">_Cancel</Button>