155 lines
4.7 KiB
XML
155 lines
4.7 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="red">
|
||
|
||
<!-- Панель для списка студентов -->
|
||
<Border Background="yellow"
|
||
CornerRadius="10"
|
||
Padding="20"
|
||
Margin="20"
|
||
Width="400">
|
||
|
||
<ListBox ItemsSource="{Binding Users}"
|
||
|
||
Width="500"
|
||
SelectionMode="Multiple"
|
||
SelectedItems="{Binding SelectedUsers}"
|
||
Background="Transparent">
|
||
<ListBox.ItemTemplate>
|
||
<DataTemplate>
|
||
<Border Background="#F0F2F5"
|
||
CornerRadius="5"
|
||
Padding="10"
|
||
Margin="5">
|
||
<TextBlock Text="{Binding Name}" FontSize="16" VerticalAlignment="Center" />
|
||
</Border>
|
||
</DataTemplate>
|
||
</ListBox.ItemTemplate>
|
||
|
||
<!-- Контекстное меню для списка -->
|
||
<ListBox.ContextMenu>
|
||
<ContextMenu>
|
||
<MenuItem Header="Удалить" Click="OnDeleteUserClick"/>
|
||
<!-- Кнопка для удаления пользователя -->
|
||
<MenuItem Header="Редактировать" Click="OnEditUserClick"/>
|
||
<!-- Кнопка для редактирования пользователя -->
|
||
</ContextMenu>
|
||
</ListBox.ContextMenu>
|
||
</ListBox>
|
||
</Border>
|
||
|
||
<!-- Верхняя панель с комбобоксами, расположенная в правом верхнем углу -->
|
||
<Border DockPanel.Dock="Top"
|
||
Background="yellow"
|
||
CornerRadius="10"
|
||
Padding="20"
|
||
Margin="0,20,20,0">
|
||
<StackPanel HorizontalAlignment="Center" Spacing="20">
|
||
<ComboBox ItemsSource="{Binding Groups}"
|
||
|
||
SelectedValue="{Binding SelectedGroupItem}"
|
||
Width="300"
|
||
Background="Green"
|
||
CornerRadius="5"
|
||
FontSize="14">
|
||
<ComboBox.ItemTemplate>
|
||
<DataTemplate>
|
||
<TextBlock Text="{Binding Name}" FontSize="14" />
|
||
</DataTemplate>
|
||
</ComboBox.ItemTemplate>
|
||
</ComboBox>
|
||
|
||
<ComboBox ItemsSource="{Binding SortOptions}"
|
||
|
||
SelectedItem="{Binding SelectedSortOption}"
|
||
Width="300"
|
||
Background="Green"
|
||
CornerRadius="5"
|
||
FontSize="14">
|
||
<ComboBox.ItemTemplate>
|
||
<DataTemplate>
|
||
<TextBlock Text="{Binding}" FontSize="14" />
|
||
</DataTemplate>
|
||
</ComboBox.ItemTemplate>
|
||
</ComboBox>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<!-- Нижняя панель с кнопками, расположенная снизу справа -->
|
||
<Border DockPanel.Dock="Bottom"
|
||
Background="yellow"
|
||
CornerRadius="10"
|
||
Padding="20"
|
||
Margin="0,20,20,0">
|
||
<StackPanel HorizontalAlignment="Right" Spacing="30">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<Button Content="Добавить"
|
||
|
||
Command="{Binding AddStudentCommand}"
|
||
|
||
Width="250"
|
||
Background="Blue"
|
||
Foreground="#FFFFFF"
|
||
CornerRadius="5"
|
||
FontSize="14">
|
||
<Button.Styles>
|
||
<Style Selector="Button:pointerover">
|
||
<Setter Property="Background" Value="#43A047"/>
|
||
<!-- Изменение фона при наведении -->
|
||
</Style>
|
||
</Button.Styles>
|
||
</Button>
|
||
|
||
|
||
|
||
<Button Content="Посещаемость по дате"
|
||
Command="{Binding NextPageCommand}"
|
||
|
||
Width="250"
|
||
Background="Green"
|
||
Foreground="#FFFFFF"
|
||
CornerRadius="5"
|
||
FontSize="14">
|
||
<Button.Styles>
|
||
<Style Selector="Button:pointerover">
|
||
<Setter Property="Background" Value="#1E88E5"/>
|
||
<!-- Изменение фона при наведении -->
|
||
</Style>
|
||
</Button.Styles>
|
||
</Button>
|
||
|
||
|
||
<Button Content="Удалить всех студентов"
|
||
Command="{Binding RemoveAllStudentsCommand}"
|
||
|
||
Width="250"
|
||
Background="Red"
|
||
Foreground="#FFFFFF"
|
||
CornerRadius="5"
|
||
FontSize="14">
|
||
<Button.Styles>
|
||
<Style Selector="Button:pointerover">
|
||
<Setter Property="Background" Value="#E53935"/>
|
||
<!-- Изменение фона при наведении -->
|
||
</Style>
|
||
</Button.Styles>
|
||
</Button>
|
||
|
||
</StackPanel>
|
||
</Border>
|
||
</DockPanel>
|
||
</UserControl>
|