agrobot_base/AgroBase/OperationControl/Windows/DockWindow.xaml

96 lines
4.1 KiB
XML

<Window x:Class="OperationControl.Windows.DockWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:OperationControl.Windows"
xmlns:localHelpers="clr-namespace:OperationControl.Helpers"
mc:Ignorable="d"
Title="DockWindow" Height="1025" Width="1920" WindowStartupLocation="CenterScreen" WindowState="Maximized">
<Window.Resources>
<!--<localHelpers:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>-->
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<!-- Topo -->
<RowDefinition Height="*"/>
<!-- Centro -->
<RowDefinition Height="120"/>
<!-- Rodapé -->
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding LeftPanelWidth}"/>
<!-- Lateral esquerda (voltar) -->
<ColumnDefinition Width="*"/>
<!-- Centro -->
<ColumnDefinition Width="{Binding RightPanelWidth}"/>
<!-- Lateral direita (avançar) -->
</Grid.ColumnDefinitions>
<!-- Topo (span em 3 colunas) -->
<Border Grid.Row="0" Grid.ColumnSpan="3"
Background="#222"
Padding="8">
<ContentControl Content="{Binding TopContent}"/>
</Border>
<!-- Área central principal -->
<Border Grid.Row="1" Grid.Column="1"
Margin="8"
BorderThickness="1"
BorderBrush="Gray">
<ContentControl Content="{Binding CenterContent}"/>
</Border>
<!-- Rodapé (span 3 colunas) -->
<Border Grid.Row="2" Grid.ColumnSpan="3"
Background="#181818"
Padding="8">
<ContentControl Content="{Binding BottomContent}"/>
</Border>
<!-- Lateral esquerda -->
<Grid Grid.Row="1" Grid.Column="0" Margin="8">
<ContentControl Content="{Binding LeftContent}">
<ContentControl.Style>
<Style TargetType="ContentControl">
<Setter Property="Content" Value="{x:Null}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding LeftContent}" Value="{x:Null}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ContentControl">
<Grid>
<Button Content="⮜"
FontSize="24"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="40"
Height="40"
Command="{Binding BackCommand}"
IsEnabled="{Binding CanGoBack}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</ContentControl.Style>
</ContentControl>
</Grid>
<!-- Lateral direita -->
<Border Grid.Row="1" Grid.Column="2"
Margin="8"
BorderThickness="1"
BorderBrush="#404040"
Background="#1C1C1C">
<ContentControl Content="{Binding RightContent}"/>
</Border>
</Grid>
</Window>