Files
GSS2Rework/GSS2/Views/Common/CameraView.axaml
T

51 lines
1.9 KiB
XML

<UserControl
x:Class="GSS2.Views.Common.CameraView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:GSS2.ViewModels.Common"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:DataType="vm:CameraViewModel">
<UserControl.Resources>
<SolidColorBrush x:Key="MainBackground" Color="#001e46" />
<SolidColorBrush x:Key="ButtonBackground" Color="#0865b2" />
<SolidColorBrush x:Key="ButtonForeground" Color="#ffffff" />
<x:Double x:Key="ButtonFontSize">20</x:Double>
</UserControl.Resources>
<UserControl.Styles>
<Style Selector="Button">
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="Background" Value="{StaticResource ButtonBackground}" />
<Setter Property="Foreground" Value="{StaticResource ButtonForeground}" />
</Style>
<Style Selector="TextBlock">
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="FontSize" Value="{StaticResource ButtonFontSize}"/>
</Style>
</UserControl.Styles>
<Border BorderThickness="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <!-- Камера -->
<ColumnDefinition Width="Auto"/> <!-- Осветитель -->
</Grid.ColumnDefinitions>
<ContentControl Grid.Column="0" Content="{Binding Camera}"/> <!-- Камера -->
<ContentControl Grid.Column="1" Content="{Binding Illuminator}"/> <!-- Осветитель -->
</Grid>
</Border>
</UserControl>