<fw:BaseWindow x:Class="Com.FirmLib.UI.Seller.WinSingleProductTypeSelector"
             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:fw="http://schemas.FWind/xaml"
             xmlns:uc="clr-namespace:Com.FirmLib.UI.Common"
            Name="this"
            Height="200" Width="300" Title="型号" WindowStartupLocation="CenterOwner">
    <Grid Margin="5" >
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition Height="30"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>

            <Label HorizontalAlignment="Right"  Content="品牌:"></Label>
            <ComboBox Grid.Row="0" Grid.Column="1" ItemsSource="{Binding Root.Items,Mode=OneWay}" SelectedItem="{Binding Root.CurrentItem}" DisplayMemberPath="RefItem.Name" SelectedValuePath="Value" SelectedValue="{Binding CurrentBrandId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  Margin="5">
            </ComboBox>

            <Label HorizontalAlignment="Right" Grid.Row="1" Grid.Column="0"  Content="产品名:"></Label>
            <ComboBox Grid.Row="1" Grid.Column="1" ItemsSource="{Binding Root.CurrentItem.Nodes,Mode=OneWay}" SelectedItem="{Binding Root.CurrentItem.CurrentItem}" DisplayMemberPath="RefItem.Name" SelectedValuePath="Value" SelectedValue="{Binding ProductId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  Margin="5">
            </ComboBox>

            <Label HorizontalAlignment="Right" Grid.Row="2" Grid.Column="0"  Content="型号:"></Label>
            <ComboBox Grid.Row="2" Grid.Column="1" ItemsSource="{Binding Root.CurrentItem.CurrentItem.Nodes,Mode=OneWay}" SelectedItem="{Binding Root.CurrentItem.CurrentItem.CurrentItem}" DisplayMemberPath="RefItem.Name" SelectedValuePath="Value" SelectedValue="{Binding ProductTypeId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  Margin="5">
            </ComboBox>
        </Grid>
      
      

        <StackPanel Grid.Row="1"  Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
            <Button Command="{Binding Commands.OkCommand}" CommandParameter="{Binding ElementName=this}"  Style="{StaticResource ResourceKey={x:Static uc:CommonStyles.ButtonKey}}"  Height="23" Width="60"  Margin="0" Content="确定" Click="btnOK_Click"/>
           
        </StackPanel>

      
    </Grid>
</fw:BaseWindow>
