12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <UserControl xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- mc:Ignorable="d" d:DesignWidth="440" d:DesignHeight="990"
- xmlns:vm="using:AvaloniaApplication4.ViewModels"
- x:DataType="vm:MainPageViewModel"
- Background="#B44A45"
- Padding="44"
- x:Class="AvaloniaApplication4.Views.MenuPage">
- <ScrollViewer>
- <StackPanel Orientation="Vertical">
- <StackPanel Orientation="Horizontal" Margin="0 0 0 75" HorizontalAlignment="Stretch">
- <Image Source="/Assets/Images/logoNGK.png" VerticalAlignment="Center" Height="94" Width="120"/>
- <TextBlock Margin="40 0 0 0" Text="Меню" VerticalAlignment="Center" Classes="titleStyleLight" FontWeight="Bold"/>
- </StackPanel>
- <TextBlock IsVisible="{Binding IsVisibleBase}" Margin="0 0 0 40" Text="Основные действия" Classes="mediumTextLight" FontWeight="Bold" FontSize="24"/>
- <ListBox Background="Transparent" IsVisible="{Binding IsVisibleBase}" ItemsSource="{Binding BasicActionsMenuElements}" Margin="0 0 0 70">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Button HorizontalAlignment="Stretch" Classes="menuElement" Content="{Binding NameElement}" Command="{Binding $parent[UserControl].((vm:MainPageViewModel)DataContext).SetActivePage}" CommandParameter="{Binding IdElement}" Margin="0 0 0 5"></Button>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <TextBlock Margin="0 0 0 40" IsVisible="{Binding IsVisibleAdditional}" Text="Дополнительные действия" Classes="mediumTextLight" FontWeight="Bold" FontSize="24"/>
- <ListBox Background="Transparent" IsVisible="{Binding IsVisibleAdditional}" ItemsSource="{Binding AdditionalActionsMenuElements}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Button HorizontalAlignment="Stretch" Classes="menuElement" Content="{Binding NameElement}" Command="{Binding $parent[UserControl].((vm:MainPageViewModel)DataContext).SetActivePage}" CommandParameter="{Binding IdElement}" Margin="0 0 0 5"></Button>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <StackPanel Margin="0 100 0 0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
- <Button HorizontalAlignment="Left" Command ="{Binding LogOut}">
- <Image Source="/Assets/Images/LogOut.png" VerticalAlignment="Center" HorizontalAlignment="Center"/>
- </Button>
- <Button HorizontalAlignment="Right" Command="{Binding ToAccount}">
- <Image Source="/Assets/Images/Account.png" VerticalAlignment="Center" HorizontalAlignment="Center"/>
- </Button>
- </StackPanel>
- </StackPanel>
- </ScrollViewer>
- </UserControl>
|