<Window x:Class="Aucma.Core.OldBoxFoam.Views.SearchCriteriaView"
        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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Aucma.Core.OldBoxFoam.Views"
        mc:Ignorable="d"
        Title="搜索条件配置" Name="window"   FontFamily="Microsoft YaHei"
        Background="#1152AC" Height="350" Width="600" WindowStartupLocation="CenterScreen"
        d:DesignHeight="350"
        d:DesignWidth="600"
        ResizeMode="NoResize" Topmost="True">
    <Window.Resources>
        <Style x:Key="CustomTextBoxStyle" TargetType="TextBox">
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="BorderBrush" Value="#CCCCCC" />
            <Setter Property="Background" Value="#F2F2F2" />
            <Setter Property="Padding" Value="5" />
            <Setter Property="FontSize" Value="12" />
            <Setter Property="Foreground" Value="#333333" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="Margin" Value="5" />
            <Setter Property="MinWidth" Value="120" />
            <Setter Property="MinHeight" Value="30" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="TextBox">
                        <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                            <ScrollViewer x:Name="PART_ContentHost" />
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Opacity" Value="0.5" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Border Margin="5" Background="#1254AB" CornerRadius="10">
        <Border.Effect>
            <DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
        </Border.Effect>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="6*"/>
                <RowDefinition Height="2*"/>
            </Grid.RowDefinitions>
            <Border Grid.Row="0" BorderBrush="#1254AB" BorderThickness="2" Margin="5">
                <Border.Effect>
                    <DropShadowEffect Color="#1254AB" ShadowDepth="0" BlurRadius="5" Opacity="0.5" Direction="0"></DropShadowEffect>
                </Border.Effect>
                <!--<ItemsControl x:Name="YourItemsControl" ItemsSource="{Binding Configurations}">
                    <ItemsControl.ItemsPanel>
                        <ItemsPanelTemplate>
                            <WrapPanel Orientation="Horizontal" />
                        </ItemsPanelTemplate>
                    </ItemsControl.ItemsPanel>
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <TextBox x:Name="YourTextBoxName" Style="{StaticResource CustomTextBoxStyle}" Text="{Binding Path=.  , Mode=TwoWay ,UpdateSourceTrigger=PropertyChanged}" />
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>-->

                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <StackPanel Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal">
                        <TextBox Text="{Binding Configurations[0], Mode=TwoWay}"  FontSize="18" BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
                        <TextBox Text="{Binding Configurations[1], Mode=TwoWay}"  FontSize="18"   BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
                        <TextBox Text="{Binding Configurations[2], Mode=TwoWay}"  FontSize="18"   BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
                        <TextBox Text="{Binding Configurations[3], Mode=TwoWay}"  FontSize="18"   BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
                        <TextBox Text="{Binding Configurations[4], Mode=TwoWay}"  FontSize="18"   BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
                    </StackPanel>

                    <StackPanel Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal">
                        <TextBox Text="{Binding Configurations[5], Mode=TwoWay}"  FontSize="18"  BorderBrush="#FFFFFF"  Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
                        <TextBox Text="{Binding Configurations[6], Mode=TwoWay}"  FontSize="18"  BorderBrush="#FFFFFF"  Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
                        <TextBox Text="{Binding Configurations[7], Mode=TwoWay}"  FontSize="18"   BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
                        <TextBox Text="{Binding Configurations[8], Mode=TwoWay}"  FontSize="18"   BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
                        <TextBox Text="{Binding Configurations[9], Mode=TwoWay}"  FontSize="18"   BorderBrush="#FFFFFF" Foreground="#FFFFFF" Height="30px" Width="100px" Margin="10,0,0,0"/>
                    </StackPanel>
                </Grid>

            </Border>

            <Border Grid.Row="1" BorderBrush="#1254AB" BorderThickness="2" Margin="5">
                <Border.Effect>
                    <DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.5" Direction="0"></DropShadowEffect>
                </Border.Effect>
                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="10 0">
                    <Button Content="保    存" Command="{Binding SaveSearchCriteriaCommand}" CommandParameter="{Binding ElementName=window}"   Margin="5 0" />
                    <Button Content="取    消" Command="{Binding CloseWindowCommand}" CommandParameter="{Binding ElementName=window}"  Background="#FF9900"  BorderBrush="#FF9900" Margin="5 0" />
                </StackPanel>

            </Border>
        </Grid>

    </Border>
</Window>