<UserControl x:Class="MWSDomain.Common.UserControls.MainPopupBox"
             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:MWSDomain.Common.UserControls"
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <Grid>
        <materialDesign:PopupBox DockPanel.Dock="Right" PlacementMode="BottomAndAlignRightEdges" Width="30" Height="30" StaysOpen="False" Foreground="White">
            <ItemsControl  ItemsSource="{Binding Path=PopBoxView.PupBoxModels}">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>

                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Button Command="{Binding ApplyCommand}"
                                CommandParameter="{Binding}">
                            <StackPanel Orientation="Horizontal">
                                <materialDesign:PackIcon Kind="{Binding KindName}" Foreground="Black" VerticalAlignment="Center"/>
                                <TextBlock Text="{Binding Name}" Margin="5 0 0 0" VerticalAlignment="Center"/>
                            </StackPanel>
                        </Button>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </materialDesign:PopupBox>
    </Grid>
</UserControl>
