57 lines
2.6 KiB
XML
57 lines
2.6 KiB
XML
<Window 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.MainWindow"
|
||
Icon="/Assets/avalonia-logo.ico"
|
||
Title="Presence.Desktop"
|
||
x:DataType="vm:MainWindowViewModel">
|
||
|
||
<DockPanel Background="White">
|
||
<!-- Верхняя панель с комбобоксами -->
|
||
<StackPanel DockPanel.Dock="Top" HorizontalAlignment="Center" Margin="20">
|
||
<!-- Первый ComboBox для выбора группы -->
|
||
<ComboBox ItemsSource="{Binding Groups}" SelectedValue="{Binding SelectedGroupItem}" HorizontalAlignment="Center" Width="300" Margin="10">
|
||
<ComboBox.ItemTemplate>
|
||
<DataTemplate>
|
||
<TextBlock Text="{Binding Name}" />
|
||
</DataTemplate>
|
||
</ComboBox.ItemTemplate>
|
||
</ComboBox>
|
||
|
||
<!-- Второй ComboBox для выбора способа сортировки -->
|
||
<ComboBox ItemsSource="{Binding SortOptions}" SelectedItem="{Binding SelectedSortOption}" HorizontalAlignment="Center" Width="300" Margin="10">
|
||
<ComboBox.ItemTemplate>
|
||
<DataTemplate>
|
||
<TextBlock Text="{Binding}" />
|
||
</DataTemplate>
|
||
</ComboBox.ItemTemplate>
|
||
</ComboBox>
|
||
</StackPanel>
|
||
|
||
<!-- Центральная панель для списка студентов -->
|
||
<Border Padding="10" Background="LightGray">
|
||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||
<!-- Список студентов -->
|
||
<ListBox ItemsSource="{Binding Users}" HorizontalAlignment="Center" Width="350" Background="Bisque" Margin="10">
|
||
<ListBox.ItemTemplate>
|
||
<DataTemplate>
|
||
<StackPanel Orientation="Horizontal" Margin="5">
|
||
<TextBlock Text="{Binding Name}" VerticalAlignment="Center" />
|
||
</StackPanel>
|
||
</DataTemplate>
|
||
</ListBox.ItemTemplate>
|
||
</ListBox>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<!-- Нижняя панель с кнопками -->
|
||
<StackPanel DockPanel.Dock="Bottom" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="20">
|
||
<Button Content="Удалить всех студентов" Command="{Binding RemoveAllStudentsCommand}" HorizontalAlignment="Center" Width="250" Margin="10"/>
|
||
<Button Content="Добавить студента" Command="{Binding AddStudentCommand}" HorizontalAlignment="Center" Width="250" Margin="10"/>
|
||
</StackPanel>
|
||
</DockPanel>
|
||
</Window>
|