<UserControl
    x:Class="Semi.Avalonia.Demo.Pages.AutoCompleteBoxDemo"
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="clr-namespace:Semi.Avalonia.Demo.Pages"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignHeight="450"
    d:DesignWidth="800"
    x:CompileBindings="False"
    x:DataType="local:AutoCompleteBoxDemoViewModel"
    mc:Ignorable="d">
    <Design.DataContext>
        <local:AutoCompleteBoxDemoViewModel />
    </Design.DataContext>
    <StackPanel HorizontalAlignment="Left" Spacing="20">
        <StackPanel.Styles>
            <Style Selector="AutoCompleteBox">
                <Setter Property="Width" Value="300" />
            </Style>
        </StackPanel.Styles>
        <AutoCompleteBox
            ItemsSource="{Binding States}"
            ValueMemberBinding="{Binding Name}"
            Watermark="Please select a State">
            <AutoCompleteBox.ItemTemplate>
                <DataTemplate DataType="local:StateData">
                    <TextBlock Text="{Binding Name}" />
                </DataTemplate>
            </AutoCompleteBox.ItemTemplate>
        </AutoCompleteBox>
        <AutoCompleteBox
            Classes="Large"
            ItemsSource="{Binding States}"
            ValueMemberBinding="{ReflectionBinding Name}">
            <AutoCompleteBox.ItemTemplate>
                <DataTemplate DataType="local:StateData">
                    <TextBlock Text="{Binding Name}" />
                </DataTemplate>
            </AutoCompleteBox.ItemTemplate>
        </AutoCompleteBox>
        <AutoCompleteBox
            Classes="Small"
            ItemsSource="{Binding States}"
            ValueMemberBinding="{ReflectionBinding Name}">
            <AutoCompleteBox.ItemTemplate>
                <DataTemplate DataType="local:StateData">
                    <TextBlock Text="{Binding Name}" />
                </DataTemplate>
            </AutoCompleteBox.ItemTemplate>
        </AutoCompleteBox>
        <AutoCompleteBox
            Classes="Bordered"
            ItemsSource="{Binding States}"
            ValueMemberBinding="{ReflectionBinding Name}">
            <AutoCompleteBox.ItemTemplate>
                <DataTemplate DataType="local:StateData">
                    <TextBlock Text="{Binding Name}" />
                </DataTemplate>
            </AutoCompleteBox.ItemTemplate>
        </AutoCompleteBox>
        <AutoCompleteBox
            IsEnabled="False"
            ItemsSource="{Binding States}"
            ValueMemberBinding="{ReflectionBinding Name}"
            Watermark="Disabled">
            <AutoCompleteBox.ItemTemplate>
                <DataTemplate DataType="local:StateData">
                    <TextBlock Text="{Binding Name}" />
                </DataTemplate>
            </AutoCompleteBox.ItemTemplate>
        </AutoCompleteBox>
        <AutoCompleteBox 
            InnerLeftContent="https://"
            InnerRightContent=".com"
            ItemsSource="{Binding States}"
            ValueMemberBinding="{ReflectionBinding Name}">
            <AutoCompleteBox.ItemTemplate>
                <DataTemplate DataType="local:StateData">
                    <TextBlock Text="{Binding Name}" />
                </DataTemplate>
            </AutoCompleteBox.ItemTemplate>
        </AutoCompleteBox>
    </StackPanel>
</UserControl>
