presence/Presence.Desktop/Views/GroupView.axaml

75 lines
3.6 KiB
Plaintext
Raw Permalink Normal View History

2024-12-04 19:33:12 +00:00
<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">
<Design.DataContext>
<vm:GroupViewModel/>
</Design.DataContext>
<DockPanel Background="Azure">
2024-12-23 15:12:32 +00:00
<Button Content="Назад" Command="{Binding GoBackCommand}" Foreground="Black" DockPanel.Dock="Top" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10" />
2024-12-04 19:33:12 +00:00
<StackPanel Width="200" DockPanel.Dock="Right" HorizontalAlignment="Center" Background="Gray">
2024-12-22 19:41:45 +00:00
<Button Content="Remove Users by Group" HorizontalAlignment="Center" Margin="10" Command="{Binding ButtonRemoveUsersByGroup}"/>
<Button Content="Import Students" HorizontalAlignment="Center" Margin="10" Command="{Binding ImportStudentsCommand}"/>
2024-12-04 19:33:12 +00:00
</StackPanel>
<StackPanel DockPanel.Dock="Bottom">
<TextBlock Text="List ↑" HorizontalAlignment="Center"/>
</StackPanel>
2024-12-22 19:41:45 +00:00
<StackPanel Spacing="10" HorizontalAlignment="Center" DockPanel.Dock="Top" Orientation="Horizontal">
2024-12-04 19:33:12 +00:00
<TextBlock Text="Combobox ->"/>
2024-12-22 19:41:45 +00:00
<ComboBox ItemsSource="{Binding Groups}" SelectedValue="{Binding SelectedGroupItem}">
2024-12-04 19:33:12 +00:00
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
2024-12-05 08:13:50 +00:00
<ComboBox ItemsSource="{Binding SecondComboBoxItems}" SelectedValue="{Binding SelectedSecondItem}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
2024-12-04 19:33:12 +00:00
<ComboBox/>
</StackPanel>
<Border>
2024-12-22 19:41:45 +00:00
<ListBox Background="Bisque"
ItemsSource="{Binding Users}"
SelectedItems="{Binding SelectedUsers}"
SelectionMode="Multiple">
2024-12-04 19:33:12 +00:00
<ListBox.ItemTemplate>
<DataTemplate>
2024-12-22 19:41:45 +00:00
<StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="{Binding Name}" Foreground="Black" />
2024-12-04 19:33:12 +00:00
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
2024-12-22 19:41:45 +00:00
<ListBox.ContextMenu>
<ContextMenu>
<MenuItem Header="Delete User"
Command="{Binding RemoveSelectedUsersCommand}"
CommandParameter="{Binding SelectedUsers}" />
<MenuItem Header="Update FIO">
<StackPanel>
<TextBox Text="{Binding NewFIO, Mode=TwoWay}" Width="150" />
<Button Content="Update"
Command="{Binding UpdateUserFIOCommand}"
CommandParameter="{Binding SelectedUserForUpdate}" />
</StackPanel>
</MenuItem>
</ContextMenu>
</ListBox.ContextMenu>
2024-12-04 19:33:12 +00:00
</ListBox>
</Border>
</DockPanel>
</UserControl>