Dispenser/DispenserUI/Views/ContainerView.axaml

53 lines
3.1 KiB
Plaintext
Raw Normal View History

2024-08-16 07:20:09 +00:00
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:viewModels="clr-namespace:DispenserUI.ViewModels"
xmlns:converter="clr-namespace:DispenserUI.ViewModels.Converter"
xmlns:common="clr-namespace:DispenserUI.Views.Common"
Width="1920" Height="1000"
IsVisible="{Binding Visible}"
x:DataType="viewModels:ContainerViewModel"
x:Class="DispenserUI.Views.ContainerView">
<UserControl.Resources>
<converter:MenuBgConverter x:Key="MenuBgConverter" />
<converter:MenuFgConverter x:Key="MenuFgConverter" />
<converter:MenuBorderConverter x:Key="MenuBorderConverter" />
</UserControl.Resources>
<Grid ColumnDefinitions="143,*">
<Border Grid.Column="0" HorizontalAlignment="Center">
<common:SystemStatusView />
</Border>
<Border Grid.Column="1" BoxShadow="-4 0 30 0 LightGray">
<StackPanel>
<Grid>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Background="White"
Height="90">
<Button Content="首页"
Background="{Binding CurrentPage,Converter={StaticResource MenuBgConverter},ConverterParameter='IndexView'}"
Foreground="{Binding CurrentPage,Converter={StaticResource MenuFgConverter},ConverterParameter='IndexView'}"
VerticalContentAlignment="Center"
CornerRadius="15"
FontSize="16"
Command="{Binding ToIndexView}"
Margin="15,0,0,0"
Height="50" Width="180" HorizontalContentAlignment="Center"
BorderBrush="{Binding CurrentPage,Converter={StaticResource MenuBorderConverter},ConverterParameter='IndexView'}"
BorderThickness="1" />
<Button Content="设置"
Background="{Binding CurrentPage,Converter={StaticResource MenuBgConverter},ConverterParameter='SettingView'}"
Foreground="{Binding CurrentPage,Converter={StaticResource MenuFgConverter},ConverterParameter='SettingView'}"
VerticalContentAlignment="Center" CornerRadius="15"
Margin="15,0,0,0"
FontSize="16"
Command="{Binding ToSettingsView}"
Height="50" Width="180" HorizontalContentAlignment="Center"
BorderBrush="{Binding CurrentPage,Converter={StaticResource MenuBorderConverter},ConverterParameter='SettingView'}"
BorderThickness="1" />
</StackPanel>
</Grid>
<StackPanel>
<TextBlock></TextBlock>
</StackPanel>
</StackPanel>
</Border>
</Grid>
</UserControl>