<Window.Resources>
<Style x:Key="InputField" TargetType="{x:Type TextBox}">
<Setter Property="MinWidth" Value="172" />
<Setter Property="Foreground" Value="Blue" />
</Style>
<Style x:Key="Heading" TargetType="{x:Type TextBlock}">
<Setter Property="FontWeight" Value="Bold" />
</Style>
</Window.Resources>
<Grid Margin="4">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="32" />
</Grid.RowDefinitions>
<!-- search box -->
<GroupBox Grid.Row="0" Padding="4">
<GroupBox.Header>
Padding="4" <TextBlock Style="{StaticResource Heading}"
Header="Work Text="Work Order Name">Name" />
</GroupBox.Header>
<StackPanel Orientation="Horizontal">
<TextBox Text="{Binding WorkOrderName}"
HorizontalAlignment="Left"
Width="172" Margin="2"
AcceptsReturn="False">
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding GetWorkOrderCommand}" />
</TextBox.InputBindings>
</TextBox>
<Button Command="{Binding GetWorkOrderCommand}"
Margin="2"
Padding="2">
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="Images/find.png" />
<!-- <TextBlock Text="Search" /TextBox> -->
</StackPanel>
</Button.InputBindings>Content>
</TextBox>Button>
</StackPanel>
</GroupBox>
<!-- form -->
<GroupBox Grid.Row="1" Padding="2" Margin="2"
Padding="4"IsEnabled="{Binding IsNewWorkOrder}">
<GroupBox.Header>
Header="Work <TextBlock Style="{StaticResource Heading}"
Text="Work Order Info" />
</GroupBox.Header>
IsEnabled="{Binding IsNewWorkOrder}"> <ScrollViewer VerticalScrollBarVisibility="Auto">
<WrapPanel DataContext="{Binding SelectedWorkOrder}">
<StackPanel Margin="2">
<TextBlock Text="Part Number"/>
<TextBox Style="{StaticResource InputField}"
Text="{Binding PartNumber}"/>
</StackPanel>
<StackPanel Margin="2">
<TextBlock Text="Created"/>
<TextBox Style="{StaticResource InputField}"
Text="{Binding Created}"/>
</StackPanel>
<StackPanel Margin="2">
<TextBlock Text="Closed"/>
<TextBox Style="{StaticResource InputField}"
Text="{Binding Closed}"/>
</StackPanel>
<StackPanel Margin="2">
<TextBlock Text="First Number"/>
<TextBox Style="{StaticResource InputField}"
Text="{Binding FirstNumber}"/>
</StackPanel>
<StackPanel Margin="2">
<TextBlock Text="Last Number"/>
<TextBox Style="{StaticResource InputField}"
Text="{Binding LastNumber}"/>
</StackPanel>
</WrapPanel>
</ScrollViewer>
</GroupBox>
<Button<!-- bottom panel-->
<Border Grid.Row="2" Background="WhiteSmoke" />
<WrapPanel Grid.Row="2"
HorizontalAlignment="Right">
<Button Margin="4" Padding="2"
Width="128"
HorizontalAlignment="Right"
Content="Save"/>
<Button Margin="4" Padding="2"
HorizontalAlignment="Right"
Content="Close"/>
</WrapPanel>
</Grid>
I noticed the Save button doesn't have a command binding. You may want to fix that ;)