<ContentDialog
    x:Class="PCUT.Pages.CategoryUpsertDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:PCUT.Pages"
    xmlns:vm="using:PCUT.ViewModels"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    PrimaryButtonText="Save"
    PrimaryButtonStyle="{StaticResource PrimaryDialogButton}"
    PrimaryButtonCommand="{Binding Command}"
    CloseButtonText="Cancel"
    CloseButtonStyle="{StaticResource CloseDialogButton}"
    Opened="ContentDialog_Opened">

    <ContentDialog.DataContext>
        <vm:UpsertCategoryViewModel />
    </ContentDialog.DataContext>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
            <TextBlock Text="Name" FontSize="20" FontFamily="/Fonts/#Rubik Medium" Margin="0 0 0 0"/>
            <TextBox
                x:Name="CategoryNameTextBox"
                Text="{Binding Name, Mode=TwoWay}"
                PlaceholderText="Name">
            </TextBox>
        </StackPanel>
        <StackPanel Grid.Row="1" Margin="0 5 0 0">
            <TextBlock Text="Description" FontSize="20" FontFamily="/Fonts/#Rubik Medium"/>
            <TextBox
                Grid.Row="1"
                x:Name="DescriptionTextBox"
                Text="{Binding Description, Mode=TwoWay}"
                PlaceholderText="Description"
                MinHeight="64" MaxHeight="128"
                TextWrapping="Wrap">
            </TextBox>
        </StackPanel>
    </Grid>
</ContentDialog>
