<UserControl
    x:Class="AppFramework.Views.DynamicPropertyDetailsView"
    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:extensions="clr-namespace:AppFramework.Extensions"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Width="600"
    Height="480"
    mc:Ignorable="d">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>

        <Border
            Grid.RowSpan="3"
            CornerRadius="0"
            Opacity="1"
            Style="{StaticResource BorderStyle}" />

        <TextBlock
            Margin="15"
            FontSize="18"
            FontWeight="Bold"
            Text="{extensions:Translate AddNewDynamicProperty}" />

        <StackPanel Grid.Row="1" Margin="15">
            <!--  属性名称  -->
            <TextBlock Text="{extensions:Translate PropertyName}" />
            <TextBox Text="{Binding Model.PropertyName}" />

            <!--  显示名称  -->
            <TextBlock Margin="0,15,0,5" Text="{extensions:Translate DisplayName}" />
            <TextBox Text="{Binding Model.DisplayName}" />

            <!--  输入类型  -->
            <TextBlock Margin="0,15,0,5" Text="{extensions:Translate DisplayName}" />
            <ComboBox Text="{Binding Model.InputType}">
                <ComboBoxItem>SINGLE_LINE_STRING</ComboBoxItem>
                <ComboBoxItem>COMBOBOX</ComboBoxItem>
                <ComboBoxItem>CHECKBOX</ComboBoxItem>
                <ComboBoxItem>MULTISELECTCOMBOBOX</ComboBoxItem>
            </ComboBox>

            <!--  权限  -->
            <TextBlock Margin="0,15,0,0" Text="{extensions:Translate Permissions}" />
            <!--<Picker Title="{extensions:Translate SelectPermissions}" SelectedItem="{Binding Model.Permission}" />-->
        </StackPanel>

        <StackPanel
            Grid.Row="2"
            Margin="0,0,15,15"
            HorizontalAlignment="Right"
            Orientation="Horizontal">
            <Button
                Margin="0,0,10,0"
                Padding="10,5"
                Command="{Binding CancelCommand}"
                Content="{extensions:Translate Cancel}" />
            <Button
                Padding="10,5"
                Command="{Binding SaveCommand}"
                Content="{extensions:Translate Save}" />
        </StackPanel>
    </Grid>
</UserControl>
