2014-02-25 12:45:51 -08:00
|
|
|
<Window x:Class="Stylet.Samples.MasterDetail.ShellView"
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2014-04-23 09:47:42 -07:00
|
|
|
xmlns:s="https://github.com/canton7/Stylet"
|
2014-02-26 00:23:28 -08:00
|
|
|
Title="ShellView" Height="200" Width="400">
|
|
|
|
<DockPanel>
|
|
|
|
<DockPanel DockPanel.Dock="Left">
|
|
|
|
<Button DockPanel.Dock="Bottom" Command="{s:Action AddEmployee}">Hire Employee</Button>
|
|
|
|
|
|
|
|
<ListBox DockPanel.Dock="Top" Width="200" ItemsSource="{Binding Employees}" SelectedItem="{Binding SelectedEmployee}" HorizontalContentAlignment="Stretch">
|
|
|
|
<ListBox.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<DockPanel LastChildFill="False">
|
|
|
|
<TextBlock DockPanel.Dock="Left">Name: </TextBlock>
|
|
|
|
<TextBlock DockPanel.Dock="Left" Text="{Binding Name}"/>
|
|
|
|
<Button DockPanel.Dock="Right" Command="{s:Action RemoveEmployee}" CommandParameter="{Binding}">Fire</Button>
|
|
|
|
</DockPanel>
|
|
|
|
</DataTemplate>
|
|
|
|
</ListBox.ItemTemplate>
|
|
|
|
</ListBox>
|
|
|
|
</DockPanel>
|
|
|
|
|
|
|
|
<Grid DockPanel.Dock="Right" DataContext="{Binding SelectedEmployee}">
|
2014-02-25 12:45:51 -08:00
|
|
|
<Grid.ColumnDefinitions>
|
2014-02-26 00:23:28 -08:00
|
|
|
<ColumnDefinition Width="Auto"/>
|
2014-02-25 12:45:51 -08:00
|
|
|
<ColumnDefinition/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<Grid.RowDefinitions>
|
2014-02-26 00:23:28 -08:00
|
|
|
<RowDefinition Height="Auto"/>
|
2014-02-25 12:45:51 -08:00
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<Label Grid.Row="0" Grid.Column="0">Name:</Label>
|
|
|
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Name}"/>
|
|
|
|
</Grid>
|
2014-02-26 00:23:28 -08:00
|
|
|
</DockPanel>
|
2014-02-25 12:45:51 -08:00
|
|
|
</Window>
|