86 lines
3.2 KiB
XML
86 lines
3.2 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:vm="using:Presence.Desktop.ViewModels"
|
||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||
x:Class="Presence.Desktop.Views.GroupView"
|
||
x:DataType="vm:GroupViewModel">
|
||
|
||
|
||
|
||
<DockPanel Background="#F9F9F9">
|
||
<!-- Верхняя панель с комбобоксами -->
|
||
<StackPanel DockPanel.Dock="Top"
|
||
HorizontalAlignment="Center"
|
||
Margin="20"
|
||
Spacing="15">
|
||
<!-- Первый ComboBox для выбора группы -->
|
||
<ComboBox ItemsSource="{Binding Groups}"
|
||
SelectedValue="{Binding SelectedGroupItem}"
|
||
HorizontalAlignment="Center"
|
||
Width="300">
|
||
<ComboBox.ItemTemplate>
|
||
<DataTemplate>
|
||
<TextBlock Text="{Binding Name}" />
|
||
</DataTemplate>
|
||
</ComboBox.ItemTemplate>
|
||
</ComboBox>
|
||
|
||
<!-- Второй ComboBox для выбора способа сортировки -->
|
||
<ComboBox ItemsSource="{Binding SortOptions}"
|
||
SelectedItem="{Binding SelectedSortOption}"
|
||
HorizontalAlignment="Center"
|
||
Width="300">
|
||
<ComboBox.ItemTemplate>
|
||
<DataTemplate>
|
||
<TextBlock Text="{Binding}" />
|
||
</DataTemplate>
|
||
</ComboBox.ItemTemplate>
|
||
</ComboBox>
|
||
</StackPanel>
|
||
|
||
<!-- Нижняя панель с кнопками -->
|
||
<StackPanel DockPanel.Dock="Bottom"
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"
|
||
Margin="20"
|
||
Spacing="15">
|
||
<Button Content="Удалить всех студентов"
|
||
Command="{Binding RemoveAllStudentsCommand}"
|
||
HorizontalAlignment="Center"
|
||
Width="250"/>
|
||
<Button Content="Добавить студента"
|
||
Command="{Binding AddStudentCommand}"
|
||
HorizontalAlignment="Center"
|
||
Width="250"/>
|
||
<Button Content="Перейти на другую странцу"
|
||
Command="{Binding NextPageCommand}"
|
||
HorizontalAlignment="Center"
|
||
Width="250"/>
|
||
</StackPanel>
|
||
|
||
<!-- Центральная панель для списка студентов -->
|
||
<ListBox ItemsSource="{Binding Users}"
|
||
HorizontalAlignment="Center"
|
||
Width="400"
|
||
Margin="20"
|
||
SelectionMode="Multiple"
|
||
SelectedItems="{Binding SelectedUsers}">
|
||
<ListBox.ItemTemplate>
|
||
<DataTemplate>
|
||
<StackPanel Orientation="Horizontal" Margin="5">
|
||
<TextBlock Text="{Binding Name}" VerticalAlignment="Center" />
|
||
</StackPanel>
|
||
</DataTemplate>
|
||
</ListBox.ItemTemplate>
|
||
|
||
<ListBox.ContextMenu>
|
||
<ContextMenu>
|
||
<MenuItem Header="Удалить" Click="OnDeleteUserClick"/>
|
||
<MenuItem Header="Редактировать" Click="OnEditUserClick"/>
|
||
</ContextMenu>
|
||
</ListBox.ContextMenu>
|
||
</ListBox>
|
||
</DockPanel>
|
||
</UserControl> |