|
|
|
<Window xmlns="https://github.com/avaloniaui"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
xmlns:controls="using:Material.Styles.Controls"
|
|
|
|
xmlns:icons="using:Material.Icons.Avalonia"
|
|
|
|
xmlns:vm="using:JiLinApp.Pages.Main"
|
|
|
|
xmlns:fenceServer="using:JiLinApp.Pages.FenceServer"
|
|
|
|
xmlns:ptzServer="using:JiLinApp.Pages.PtzServer"
|
|
|
|
xmlns:vibrateServer="using:JiLinApp.Pages.VibrateServer"
|
|
|
|
x:Class="JiLinApp.Pages.Main.MainWindow"
|
|
|
|
x:DataType="vm:MainWindowViewModel"
|
|
|
|
Width="900" Height="560" MinWidth="775" MinHeight="560"
|
|
|
|
Icon="/Assets/avalonia-logo.ico"
|
|
|
|
Title="JiLinApp">
|
|
|
|
<Design.DataContext>
|
|
|
|
<vm:MainWindowViewModel />
|
|
|
|
</Design.DataContext>
|
|
|
|
|
|
|
|
<Window.Styles>
|
|
|
|
<Style Selector="TabControl">
|
|
|
|
<Setter Property="TabStripPlacement" Value="Left" />
|
|
|
|
<Setter Property="Background" Value="#2196f3" />
|
|
|
|
</Style>
|
|
|
|
<Style Selector="TabControl /template/ ContentPresenter">
|
|
|
|
<Setter Property="Background" Value="#F0F0F0" />
|
|
|
|
<Setter Property="Padding" Value="4" />
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style Selector="TabItem">
|
|
|
|
<Setter Property="FontSize" Value="12" />
|
|
|
|
<Setter Property="Width" Value="84" />
|
|
|
|
<Setter Property="Height" Value="63" />
|
|
|
|
<Setter Property="Background" Value="#2196f3" />
|
|
|
|
<Setter Property="Foreground" Value="#F0F0F0" />
|
|
|
|
</Style>
|
|
|
|
<Style Selector="TabItem TextBlock">
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
|
|
</Style>
|
|
|
|
<Style Selector="TabItem /template/ ContentPresenter#PART_ContentPresenter">
|
|
|
|
<Setter Property="Width" Value="80" />
|
|
|
|
<Setter Property="Height" Value="56" />
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
|
<Setter Property="Padding" Value="2 5 2 1" />
|
|
|
|
</Style>
|
|
|
|
<Style Selector="TabItem:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
|
|
|
<Setter Property="Foreground" Value="#2B579A" />
|
|
|
|
<Setter Property="Background" Value="#F0F0F0" />
|
|
|
|
</Style>
|
|
|
|
<Style Selector="TabItem:focus /template/ ContentPresenter#PART_ContentPresenter">
|
|
|
|
<Setter Property="Foreground" Value="#2B579A" />
|
|
|
|
<Setter Property="Background" Value="#F0F0F0" />
|
|
|
|
</Style>
|
|
|
|
<Style Selector="TabItem:selected /template/ ContentPresenter#PART_ContentPresenter">
|
|
|
|
<Setter Property="Foreground" Value="#2B579A" />
|
|
|
|
<Setter Property="Background" Value="#F0F0F0" />
|
|
|
|
</Style>
|
|
|
|
</Window.Styles>
|
|
|
|
|
|
|
|
<TabControl>
|
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<StackPanel>
|
|
|
|
<icons:MaterialIcon Kind="CogOutline" Width="30" Height="30" />
|
|
|
|
<TextBlock Text="Ptz服务" />
|
|
|
|
</StackPanel>
|
|
|
|
</TabItem.Header>
|
|
|
|
<ptzServer:Ptz DataContext="{Binding PtzViewModel}" />
|
|
|
|
</TabItem>
|
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<StackPanel>
|
|
|
|
<icons:MaterialIcon Kind="Server" Width="30" Height="30" />
|
|
|
|
<TextBlock Text="震动报警服务" />
|
|
|
|
</StackPanel>
|
|
|
|
</TabItem.Header>
|
|
|
|
<vibrateServer:Vibrate DataContext="{Binding VibrateViewModel}" />
|
|
|
|
</TabItem>
|
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<StackPanel>
|
|
|
|
<icons:MaterialIcon Kind="Server" Width="30" Height="30" />
|
|
|
|
<TextBlock Text="优周围网服务" />
|
|
|
|
</StackPanel>
|
|
|
|
</TabItem.Header>
|
|
|
|
<fenceServer:Fence DataContext="{Binding FenceViewModel}"/>
|
|
|
|
</TabItem>
|
|
|
|
</TabControl>
|
|
|
|
</Window>
|