<UserControl x:Class="BBWY.Client.Views.SelectShop.SelectShopDialog"
             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:BBWY.Client.Views.SelectShop"
             xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
             mc:Ignorable="d" 
             x:Name="uc"
             d:DesignHeight="200" d:DesignWidth="300">
    <Grid>
        <Border x:Name="bd" BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" MinWidth="100" Height="{Binding ActualHeight,ElementName=uc}" Background="White" Margin="5,0,0,0"
                PreviewMouseLeftButtonDown="bd_PreviewMouseLeftButtonDown">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="auto"/>
                </Grid.ColumnDefinitions>
                <TextBlock x:Name="txtShopName" Text="" Margin="5,0,0,0" VerticalAlignment="Center"/>
                <!--<c:BButton Grid.Column="1" Background="Transparent" HorizontalAlignment="Right" Margin="5,0">
                                
                            </c:BButton>-->
                <Path Style="{StaticResource path_arrowDown}"
                                  Width="10" Grid.Column="1" Margin="5,0"/>
            </Grid>
        </Border>
        
        <Popup x:Name="popup" Placement="Bottom" PlacementTarget="{Binding ElementName=bd}" StaysOpen="True"
               AllowsTransparency="True">
            <Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Background="White">
                <StackPanel Margin="10">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="团队" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                        <ComboBox x:Name="cbx_department" 
                                  ItemsSource="{Binding DepartmentList,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}"
                                  SelectedIndex="0"
                                  DisplayMemberPath="Name"
                                  Width="150" Height="25"
                                  HorizontalAlignment="Left" VerticalContentAlignment="Center"
                                  Grid.Column="1" Margin="5,0,0,0"
                                  SelectionChanged="cbx_department_SelectionChanged"/>
                    </StackPanel>

                    <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                        <TextBlock Text="店铺" HorizontalAlignment="Right" Grid.Row="1" VerticalAlignment="Center" />
                        <ComboBox x:Name="cbx_shop" Width="150" Height="25"
                                  SelectedIndex="0"
                                  HorizontalAlignment="Left" VerticalContentAlignment="Center"
                                  DisplayMemberPath="ShopName"
                                  Grid.Column="1" Grid.Row="1" Margin="5,0,0,0"/>

                    </StackPanel>
                   
                    <c:BButton x:Name="btn_ok" Content="确定" Grid.Row="2" Width="60" Height="25" HorizontalAlignment="Right"
                               Click="btn_ok_Click" Margin="0,10,0,0"/>
                </StackPanel>
            </Border>
        </Popup>
        
        
    </Grid>
</UserControl>