<UserControl x:Class="MWSDomain.Common.UserControls.MsgOnLineMenu"
             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">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="40"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <TextBlock Text="在线列表(0/20)" Margin="5 0 0 0" VerticalAlignment="Center"/>

        <ItemsControl Grid.Row="1" ItemsSource="{Binding UserInfoModelList}">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel/>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>

            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Button  Margin="0 5 0 0" Command="{Binding ApplyCommand}" CommandParameter="{Binding}" >
                        <StackPanel Orientation="Horizontal">
                            <materialDesign:PackIcon Kind="{Binding Icon}" Foreground="Red" VerticalAlignment="Center" />
                            <TextBlock Text="{Binding UserName}" FontSize="15"  FontFamily="Consolas" Margin="2 0 0 0"/>
                        </StackPanel>
                    </Button>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </Grid>
</UserControl>
