csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
2.7 KiB
75 lines
2.7 KiB
<UserControl x:Class="ControlCatalog.Pages.AutoCompleteBoxPage"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:sys="using:System"
|
|
xmlns:models="using:ControlCatalog.Models"
|
|
d:DesignHeight="600"
|
|
d:DesignWidth="400">
|
|
<StackPanel Orientation="Vertical"
|
|
Spacing="4"
|
|
MaxWidth="660">
|
|
<TextBlock Classes="h2">A control into which the user can input text</TextBlock>
|
|
|
|
<UniformGrid Margin="-8,0"
|
|
Columns="2">
|
|
<UniformGrid.Styles>
|
|
<Style Selector="StackPanel">
|
|
<Setter Property="Margin" Value="8" />
|
|
</Style>
|
|
</UniformGrid.Styles>
|
|
<StackPanel>
|
|
<TextBlock Text="MinimumPrefixLength: 0" />
|
|
<AutoCompleteBox MinimumPrefixLength="0" />
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="MinimumPrefixLength: 1" />
|
|
<AutoCompleteBox MinimumPrefixLength="1" />
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="MinimumPrefixLength: 3" />
|
|
<AutoCompleteBox MinimumPrefixLength="3" />
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="MinimumPopulateDelay: 1s" />
|
|
<AutoCompleteBox MinimumPopulateDelay="00:00:01" />
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="MaxDropDownHeight: 60" />
|
|
<AutoCompleteBox MaxDropDownHeight="60" />
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="Watermark" />
|
|
<AutoCompleteBox Watermark="Hello World" />
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="Disabled" />
|
|
<AutoCompleteBox IsEnabled="False" />
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="ValueMemberBinding" />
|
|
<AutoCompleteBox ValueMemberBinding="{Binding Capital, x:DataType=models:StateData}" />
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="Multi-Binding" />
|
|
<AutoCompleteBox Name="MultiBindingBox" FilterMode="Contains" />
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="Async Populate" />
|
|
<AutoCompleteBox Name="AsyncBox" FilterMode="None" />
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="Custom Autocomplete" />
|
|
<AutoCompleteBox Name="CustomAutocompleteBox" FilterMode="None" />
|
|
</StackPanel>
|
|
</UniformGrid>
|
|
<StackPanel>
|
|
<TextBlock Text="With Validation Errors" />
|
|
<AutoCompleteBox Name="ValidationErrors" FilterMode="None">
|
|
<DataValidationErrors.Error>
|
|
<sys:Exception />
|
|
</DataValidationErrors.Error>
|
|
</AutoCompleteBox>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</UserControl>
|
|
|