<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" />
                <Setter Property="ItemsSource">
                    <Binding Path="States" />
                </Setter>
                <Setter Property="ItemTemplate">
                    <DataTemplate DataType="local:StateData">
                        <TextBlock Text="{Binding Name}" />
                    </DataTemplate>
                </Setter>
            </Style>
        </StackPanel.Styles>

        <AutoCompleteBox
            Watermark="Please select a State"
            ValueMemberBinding="{Binding Name}" />
        <AutoCompleteBox
            Classes="Large"
            ValueMemberBinding="{ReflectionBinding Name}" />
        <AutoCompleteBox
            Classes="Small"
            ValueMemberBinding="{ReflectionBinding Name}" />
        <AutoCompleteBox
            Classes="Bordered"
            ValueMemberBinding="{ReflectionBinding Name}" />
        <AutoCompleteBox
            IsEnabled="False"
            Watermark="Disabled"
            ValueMemberBinding="{ReflectionBinding Name}" />
        <AutoCompleteBox
            InnerLeftContent="https://"
            InnerRightContent=".com"
            ValueMemberBinding="{ReflectionBinding Name}" />

        <StackPanel Orientation="Horizontal">
            <AutoCompleteBox
                Width="100"
                Classes="Large"
                Watermark="Large"
                ValueMemberBinding="{ReflectionBinding Name}" />
            <AutoCompleteBox
                Width="100"
                Watermark="Default"
                ValueMemberBinding="{ReflectionBinding Name}" />
            <AutoCompleteBox
                Width="100"
                Classes="Small"
                Watermark="Small"
                ValueMemberBinding="{ReflectionBinding Name}" />
        </StackPanel>

        <StackPanel Orientation="Horizontal">
            <AutoCompleteBox
                Width="100"
                IsEnabled="False"
                Watermark="Disabled"
                ValueMemberBinding="{ReflectionBinding Name}" />
            <AutoCompleteBox
                Width="100"
                Classes="Bordered"
                Watermark="Bordered"
                ValueMemberBinding="{ReflectionBinding Name}" />
            <AutoCompleteBox
                Width="100"
                Classes="Bordered"
                IsEnabled="False"
                ValueMemberBinding="{ReflectionBinding Name}" />
        </StackPanel>

    </StackPanel>
</UserControl>