pre-fix ToggleButton

This commit is contained in:
ShabOl 2024-04-18 01:09:08 +04:00
parent 03b17b09c6
commit 84195a9499

View File

@ -5,8 +5,124 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WPFApplication"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
WindowStartupLocation="CenterScreen"
Title="MainWindow"
Height="850"
Width="1440">
<Window.Resources>
<SolidColorBrush x:Key="MainBackgroundColor" Color="#262630"></SolidColorBrush>
<SolidColorBrush x:Key="MenuBackgroundColor" Color="#3A3B44"></SolidColorBrush>
<SolidColorBrush x:Key="MenuButtonForeground" Color="White"></SolidColorBrush>
<SolidColorBrush x:Key="StatusBarBackroundColor" Color="#206BD4"></SolidColorBrush>
<Style x:Key="MenuButtonTextStyle" TargetType="MenuItem">
<Setter Property="FontSize" Value="12"></Setter>
<Setter Property="Padding" Value="8, 5"></Setter>
<Setter Property="Foreground" Value="{StaticResource MenuButtonForeground}"></Setter>
</Style>
<Style x:Key="ListBoxStyle" TargetType="ListBox">
<Setter Property="Background" Value="{StaticResource ListBoxBrush}"></Setter>
<Setter Property="BorderBrush" Value="Black"></Setter>
</Style>
<Style x:Key="LabelStyle" TargetType="Label">
<Setter Property="FontSize" Value="16"></Setter>
<Setter Property="FontFamily" Value="Times New Roman"></Setter>
<Setter Property="FontWeight" Value="Bold"></Setter>
</Style>
<Style x:Key="ExpandCollapseToggleStyle" TargetType="ToggleButton">
<Setter Property="Focusable" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Grid Width="14" Height="14">
<Rectangle Fill="White" />
<Border Name="ExpandBorder" RenderOptions.EdgeMode="Aliased" BorderBrush="Black" BorderThickness="2">
<Path RenderOptions.EdgeMode="Aliased" Name="ExpandPath" Stroke="Black" Margin="0" StrokeThickness="2" Data="M 5 1 L 5 9 M 1 5 L 9 5" />
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Data" TargetName="ExpandPath" Value="M 1 5 L 9 5"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="ExpandBorder" Property="BorderBrush" Value="Gray" />
<Setter TargetName="ExpandPath" Property="Stroke" Value="Gray" />
<Setter Property="Data" TargetName="ExpandPath" Value=""/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid Background="{StaticResource MainBackgroundColor}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="8" />
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Menu Grid.Row="0" Background="{StaticResource MenuBackgroundColor}" >
<MenuItem Header="Directory" Style="{StaticResource MenuButtonTextStyle}"></MenuItem>
<MenuItem Header="Packages" Style="{StaticResource MenuButtonTextStyle}"></MenuItem>
<MenuItem Header="Settings" Style="{StaticResource MenuButtonTextStyle}"></MenuItem>
<MenuItem Header="Help" Style="{StaticResource MenuButtonTextStyle}"></MenuItem>
</Menu>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" MinWidth="400" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TabControl Grid.Column="0" Background="Transparent">
<TabControl.Template>
<ControlTemplate TargetType="TabControl">
<DockPanel>
<UniformGrid IsItemsHost="True" Rows="1" DockPanel.Dock="Top"></UniformGrid>
<ContentPresenter ContentSource="SelectedContent"></ContentPresenter>
</DockPanel>
</ControlTemplate>
</TabControl.Template>
<TabItem Header="Archives">
</TabItem>
<TabItem Header="Folders">
</TabItem>
<TabItem Header="Assets">
</TabItem>
</TabControl>
<GridSplitter Grid.Column="1" ResizeDirection="Columns" Width="4" VerticalAlignment="Stretch"
ResizeBehavior="PreviousAndNext" Background="{StaticResource MenuBackgroundColor}" />
<Grid Margin="0 0 3 0" Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TabControl Grid.Row="0" x:Name="TabControlName" Background="Transparent" BorderThickness="0" />
<!-- Style="{StaticResource GameFilesTabControl}" -->
<Expander Grid.Row="1" Padding="0, 3" Background="{StaticResource MenuBackgroundColor}">
<TextBox MinHeight="150" Background="{StaticResource MainBackgroundColor}" BorderThickness="0">
</TextBox>
</Expander>
</Grid>
</Grid>
<StatusBar Grid.Row="3" MinHeight="28" MaxHeight="28" Background="{StaticResource StatusBarBackroundColor}">
<TextBlock Text="Completed" Foreground="White" />
</StatusBar>
</Grid>
</Window>