EmploeeWindow.xaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <Window x:Class="WpfApp1.Windows.EmploeeWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:WpfApp1.Windows"
  7. mc:Ignorable="d"
  8. Title="Сотрудники" Height="450" Width="800">
  9. <Grid>
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="Auto"/>
  12. <RowDefinition/>
  13. </Grid.RowDefinitions>
  14. <WrapPanel Orientation="Horizontal" Margin="5" >
  15. <Button Content="Редактировать" Name="EditBtn" Click="EditBtn_Click"/>
  16. <Button Content="Регистрация" Name="RegistrationBtn" Click="RegistrationBtn_Click"/>
  17. </WrapPanel>
  18. <ListView Grid.Row="1" x:Name="emploeeList" HorizontalContentAlignment="Stretch">
  19. <ListView.ItemTemplate>
  20. <DataTemplate>
  21. <Border BorderThickness="1" BorderBrush="Black">
  22. <Grid>
  23. <Grid.RowDefinitions>
  24. <RowDefinition/>
  25. <RowDefinition/>
  26. <RowDefinition/>
  27. </Grid.RowDefinitions>
  28. <Grid.ColumnDefinitions>
  29. <ColumnDefinition/>
  30. <ColumnDefinition/>
  31. </Grid.ColumnDefinitions>
  32. <TextBlock Text="{Binding Position.Title, StringFormat=Должнсть: {0}}"/>
  33. <TextBlock Grid.Row="1">
  34. <TextBlock.Text>
  35. <MultiBinding StringFormat="{}{0} {1} {2}">
  36. <Binding Path="Surname"/>
  37. <Binding Path="Name"/>
  38. <Binding Path="Middlename"/>
  39. </MultiBinding>
  40. </TextBlock.Text>
  41. </TextBlock>
  42. <TextBlock Grid.Column="1" Text="{Binding WorkStatus.Title}"/>
  43. <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Login, StringFormat=Логин: {0}}"/>
  44. </Grid>
  45. </Border>
  46. </DataTemplate>
  47. </ListView.ItemTemplate>
  48. </ListView>
  49. </Grid>
  50. </Window>