feat: add Camera View and ViewModel

This commit is contained in:
2026-04-14 07:35:46 +03:00
parent b7a095f84d
commit fd25dcba0d
5 changed files with 95 additions and 2 deletions
+50
View File
@@ -0,0 +1,50 @@
<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>
+11
View File
@@ -0,0 +1,11 @@
using Avalonia.Controls;
namespace GSS2.Views.Common;
public partial class CameraView : UserControl
{
public CameraView()
{
InitializeComponent();
}
}