<UserControl
    x:Class="Ursa.Demo.Pages.ButtonGroupDemo"
    xmlns="https://github.com/avaloniaui"
    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:u="https://irihi.tech/ursa"
    xmlns:vm="clr-namespace:Ursa.Demo.ViewModels;assembly=Ursa.Demo"
    d:DesignHeight="450"
    d:DesignWidth="800"
    x:CompileBindings="True"
    x:DataType="vm:ButtonGroupDemoViewModel"
    mc:Ignorable="d">

    <StackPanel Margin="20" Spacing="20">
        <u:ButtonGroup Classes="Primary Solid" 
                       CommandBinding="{Binding InvokeCommand}"
                       ItemsSource="{Binding Items}" >
            <u:ButtonGroup.ItemTemplate>
                <DataTemplate x:DataType="vm:ButtonItem">
                    <TextBlock>
                        <Run Text="🐼"></Run>
                        <Run Text="{Binding Name}"></Run>
                    </TextBlock>
                </DataTemplate>
            </u:ButtonGroup.ItemTemplate>
        </u:ButtonGroup>
        
        <u:ButtonGroup Classes="Primary" 
                       ContentBinding="{Binding Name}"
                       CommandBinding="{Binding InvokeCommand}"
                       ItemsSource="{Binding Items}" >
        </u:ButtonGroup>
    </StackPanel>
</UserControl>
