presence/Presence.Desktop/Views/GroupView.axaml
2024-12-04 22:33:12 +03:00

56 lines
2.4 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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">
<!-- Панель с кнопками справа, окрашена в серый -->
<StackPanel Width="200" DockPanel.Dock="Right" HorizontalAlignment="Center" Background="Gray">
<!-- Две кнопки сверху -->
<Button Content="remove" HorizontalAlignment="Center" Margin="10" Command="{Binding ButtonRemoveUsersByGroup}"/>
<Button Content="create" HorizontalAlignment="Center" Margin="10"/>
</StackPanel>
<!-- Содержание на остальной части экрана -->
<StackPanel DockPanel.Dock="Bottom">
<TextBlock Text="List ↑" HorizontalAlignment="Center"/>
</StackPanel>
<StackPanel
Spacing="10"
HorizontalAlignment="Center"
DockPanel.Dock="Top"
Orientation="Horizontal">
<TextBlock Text="Combobox ->"/>
<ComboBox ItemsSource="{Binding Groups}" SelectedValue="{Binding SelectedGroupItem}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<ComboBox/>
<ComboBox/>
</StackPanel>
<Border>
<ListBox Background="Bisque" ItemsSource="{Binding Users}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Name}" FontSize="16" Foreground="Black"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
</DockPanel>
</UserControl>