Files
GSS2Rework/GSS2.UI.Core/Views/IlluminatorControllerView.axaml
T

93 lines
3.2 KiB
XML

<UserControl
x:Class="GSS2.UI.Core.Views.IlluminatorControllerView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:behaviors="using:GSS2.UI.Core.Behaviors"
xmlns:converters="using:GSS2.UI.Core.Converters"
xmlns:layout="using:Avalonia.Layout"
xmlns:local="using:GSS2.UI.Core.Views"
xmlns:lvc="using:LiveChartsCore.SkiaSharpView.Avalonia"
xmlns:vm="using:GSS2.UI.Core.ViewModels"
x:DataType="vm:IlluminatorControllerViewModel">
<UserControl.Styles>
<Style Selector="Slider.horizontal">
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="Maximum" Value="1" />
<Setter Property="Minimum" Value="0" />
<Setter Property="Orientation" Value="Vertical" />
</Style>
<Style Selector="Slider.vertical">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="Maximum" Value="1" />
<Setter Property="Minimum" Value="0" />
<Setter Property="Orientation" Value="Horizontal" />
</Style>
</UserControl.Styles>
<Grid>
<Grid IsVisible="{Binding Orientation, Converter={x:Static converters:OrientationToBoolConverter.IsHorizontal}}">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel
HorizontalAlignment="Center"
Orientation="Horizontal"
Spacing="20">
<Slider Classes="horizontal" Value="{Binding WhiteIntencity}" />
<Slider Classes="horizontal" Value="{Binding Uv365Intencity}" />
<Slider Classes="horizontal" Value="{Binding Uv254Intencity}" />
</StackPanel>
<ToggleButton
Grid.Row="1"
Margin="0,10,0,0"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Center"
Content="Включить"
IsChecked="{Binding Enabled}" />
</Grid>
<Grid IsVisible="{Binding Orientation, Converter={x:Static converters:OrientationToBoolConverter.IsVertical}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel
Grid.Column="0"
VerticalAlignment="Center"
Orientation="Vertical"
Spacing="20">
<Slider Classes="vertical" Value="{Binding WhiteIntencity}" />
<Slider Classes="vertical" Value="{Binding Uv365Intencity}" />
<Slider Classes="vertical" Value="{Binding Uv254Intencity}" />
</StackPanel>
<ToggleButton
Grid.Column="1"
Margin="0,0,10,0"
VerticalAlignment="Stretch"
HorizontalContentAlignment="Center"
Content="Включить"
IsChecked="{Binding Enabled}" />
</Grid>
</Grid>
</UserControl>