<UserControl x:Class="FasdDesktopUi.Pages.DetailsPage.UserControls.DetailsPageWidget"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:FasdDesktopUi.Pages.DetailsPage.UserControls"
             mc:Ignorable="d"
             d:DesignHeight="300"
             d:DesignWidth="455"
             Name="_this"
             Initialized="UserControl_Initialized">

    <UserControl.Resources>
        <Style TargetType="TextBox">
            <Setter Property="Background"
                    Value="{DynamicResource BackgroundColor.DetailsPage.Widget.Title}" />
            <Setter Property="BorderBrush"
                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
            <Setter Property="Padding"
                    Value="7.5 5" />
            <Setter Property="Foreground"
                    Value="{DynamicResource FontColor.Menu.Categories}" />
            <Setter Property="VerticalAlignment"
                    Value="Center" />
            <Style.Resources>
                <Style TargetType="Border">
                    <Setter Property="CornerRadius"
                            Value="7.5" />
                </Style>
            </Style.Resources>
        </Style>
    </UserControl.Resources>

    <Grid x:Name="WidgetGrid"
          MinHeight="{DynamicResource DetailsPage.Widget.MinHeight}"
          Height="{Binding ElementName=_this, Path=WidgetHeight}">

        <Grid.ColumnDefinitions>
            <ColumnDefinition MinWidth="{DynamicResource DetailsPage.Widget.Title.MinWidth}" />
            <ColumnDefinition MinWidth="{DynamicResource DetailsPage.Widget.Value.MinWidth}"
                              MaxWidth="{DynamicResource DetailsPage.Widget.Value.MaxWidth}" />
        </Grid.ColumnDefinitions>

        <Border x:Name="WidgetTitleBorder" x:FieldModifier="private"
                Grid.Column="0"
                Grid.Row="0"
                Grid.RowSpan="100"
                Background="{DynamicResource BackgroundColor.DetailsPage.Widget.Title}"
                CornerRadius="10,0,0,10" />

        <Border x:Name="WidgetDetailsBorder" x:FieldModifier="private"
                Grid.Column="1"
                Grid.Row="0"
                Grid.RowSpan="100"
                Background="{DynamicResource BackgroundColor.DetailsPage.Widget.Value}"
                CornerRadius="0,10,10,0" />
    </Grid>

</UserControl>
