1234567891011121314151617181920212223242526272829303132333435363738 |
- <UserControl xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="990"
- x:Class="AvaloniaApplication4.Views.ActionPages.AllEmployees"
- xmlns:vm="using:AvaloniaApplication4.ViewModels"
- x:DataType="vm:AllEmployeesViewModel"
- Background="White"
- Padding="80">
- <ScrollViewer>
- <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0 20 0 0">
- <TextBlock Margin="0 0 0 36" Text="Сотрудники" Classes="titleStyle" FontWeight="Bold"/>
- <Button Command="{Binding $parent[UserControl].((vm:AllEmployeesViewModel)DataContext).AddUser}" Margin="0 0 0 36" Content="Добавить нового сотрудника" HorizontalAlignment="Stretch"/>
- <TextBox Text="{Binding Search, Mode=TwoWay}" Margin="0 0 0 36" TextWrapping="NoWrap" Height="52" Watermark="Найдите нужного сотрудника" HorizontalAlignment="Stretch"/>
- <ListBox ItemsSource="{Binding AllUsers}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid Margin="0 0 0 15">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="3*"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <StackPanel Orientation="Horizontal" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Stretch">
- <TextBlock Text="{Binding Surname}" Classes="mediumText" TextWrapping="Wrap"/>
- <TextBlock Classes="mediumText" Text=" " TextWrapping="Wrap"/>
- <TextBlock Text="{Binding Name}" Classes="mediumText" TextWrapping="Wrap"/>
- <TextBlock Classes="mediumText" Text=" " TextWrapping="Wrap"/>
- <TextBlock Text="{Binding Patronumic}" Classes="mediumText" TextWrapping="Wrap"/>
- </StackPanel>
- <Button Command="{Binding $parent[UserControl].((vm:AllEmployeesViewModel)DataContext).EditUser}" CommandParameter="{Binding IdUser}" Content="Редактировать" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- </ScrollViewer>
- </UserControl>
|