<?xml version="1.0" encoding="utf-8" ?>
<base:LayoutUserControlBase
    x:Class="RodelAgent.UI.Controls.ColumnSplitter"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:base="using:Richasy.WinUI.Share.Base"
    xmlns:community="using:CommunityToolkit.WinUI.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="using:RodelAgent.UI.Controls"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid>
        <Rectangle
            Width="6"
            Fill="Transparent"
            Visibility="{x:Bind IsHide, Mode=OneWay}" />
        <Border
            Width="1"
            HorizontalAlignment="Center"
            VerticalAlignment="Stretch"
            Background="{ThemeResource DividerStrokeColorDefaultBrush}"
            Visibility="{x:Bind IsHide, Mode=OneWay, Converter={StaticResource BoolToVisibilityReverseConverter}}" />
        <community:PropertySizer
            x:Name="Sizer"
            HorizontalAlignment="Center"
            Binding="{x:Bind ColumnWidth, Mode=TwoWay}"
            IsFocusEngagementEnabled="False"
            IsTabStop="False"
            Maximum="{x:Bind MaxColumnWidth, Mode=OneWay}"
            Minimum="{x:Bind MinColumnWidth, Mode=OneWay}"
            Visibility="{x:Bind IsHide, Mode=OneWay, Converter={StaticResource BoolToVisibilityReverseConverter}}" />
        <local:VisibilityToggleButton
            x:Name="ToggleBtn"
            Margin="0,0,-32,0"
            VerticalAlignment="Stretch"
            CornerRadius="0,6,6,0"
            IsEnabled="{x:Bind IsHideButtonEnabled, Mode=OneWay}"
            IsHide="{x:Bind IsHide, Mode=TwoWay}" />
    </Grid>
</base:LayoutUserControlBase>
