feat: add avalonia AutoCompleteBox style.
This commit is contained in:
1 parent
48908ade16
commit
15e7e9348f
7 files changed
+404
-3
No files matched your search
@@ -0,0 +1,131 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
x:Class="HandyControlDemo.UserControl.AutoCompleteBoxDemo">
|
||||
<ScrollViewer>
|
||||
<hc:UniformSpacingPanel Spacing="32"
|
||||
Margin="32"
|
||||
ChildWrapping="Wrap">
|
||||
<StackPanel>
|
||||
<AutoCompleteBox ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains" />
|
||||
<AutoCompleteBox ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains"
|
||||
Margin="0,16,0,0"
|
||||
IsEnabled="False" />
|
||||
|
||||
<AutoCompleteBox hc:TitleElement.Title="This is the title"
|
||||
Theme="{StaticResource AutoCompleteBoxExtend}"
|
||||
ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains"
|
||||
Margin="0,32,0,0" />
|
||||
<AutoCompleteBox hc:TitleElement.Title="This is the title"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Theme="{StaticResource AutoCompleteBoxExtend}"
|
||||
ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains"
|
||||
Margin="0,32,0,0" />
|
||||
<AutoCompleteBox hc:TitleElement.Title="This is the title"
|
||||
Theme="{StaticResource AutoCompleteBoxExtend}"
|
||||
ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains"
|
||||
Margin="0,16,0,0"
|
||||
IsEnabled="False" />
|
||||
<AutoCompleteBox Watermark="please enter content"
|
||||
hc:TitleElement.Title="This item must be filled in"
|
||||
Theme="{StaticResource AutoCompleteBoxExtend}"
|
||||
ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains"
|
||||
hc:InfoElement.Necessary="True"
|
||||
Margin="0,16,0,0" />
|
||||
<AutoCompleteBox Width="380"
|
||||
hc:TitleElement.TitleWidth="120"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
hc:TitleElement.Title="The title is on the left"
|
||||
Theme="{StaticResource AutoCompleteBoxExtend}"
|
||||
ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains"
|
||||
Margin="0,32,0,0" />
|
||||
<AutoCompleteBox Width="380"
|
||||
hc:TitleElement.TitleWidth="120"
|
||||
Watermark="Please enter content"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
hc:TitleElement.Title="The title is on the left"
|
||||
hc:InfoElement.Necessary="True"
|
||||
Theme="{StaticResource AutoCompleteBoxExtend}"
|
||||
ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains"
|
||||
Margin="0,16,0,0" />
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<AutoCompleteBox ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains"
|
||||
Theme="{StaticResource AutoCompleteBox.Small}" />
|
||||
<AutoCompleteBox ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains"
|
||||
Theme="{StaticResource AutoCompleteBox.Small}"
|
||||
Margin="0,16,0,0"
|
||||
IsEnabled="False" />
|
||||
|
||||
<AutoCompleteBox hc:TitleElement.Title="This is the title"
|
||||
Theme="{StaticResource AutoCompleteBoxExtend.Small}"
|
||||
ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains"
|
||||
Margin="0,32,0,0" />
|
||||
<AutoCompleteBox hc:TitleElement.Title="This is the title"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Theme="{StaticResource AutoCompleteBoxExtend.Small}"
|
||||
ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains"
|
||||
Margin="0,32,0,0" />
|
||||
<AutoCompleteBox hc:TitleElement.Title="This is the title"
|
||||
Theme="{StaticResource AutoCompleteBoxExtend.Small}"
|
||||
ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains"
|
||||
Margin="0,16,0,0"
|
||||
IsEnabled="False" />
|
||||
<AutoCompleteBox Watermark="please enter content"
|
||||
hc:TitleElement.Title="This item must be filled in"
|
||||
Theme="{StaticResource AutoCompleteBoxExtend.Small}"
|
||||
ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains"
|
||||
hc:InfoElement.Necessary="True"
|
||||
Margin="0,16,0,0" />
|
||||
<AutoCompleteBox Width="380"
|
||||
hc:TitleElement.TitleWidth="120"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
hc:TitleElement.Title="The title is on the left"
|
||||
Theme="{StaticResource AutoCompleteBoxExtend.Small}"
|
||||
ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains"
|
||||
Margin="0,32,0,0" />
|
||||
<AutoCompleteBox Width="380"
|
||||
hc:TitleElement.TitleWidth="120"
|
||||
Watermark="Please enter content"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
hc:TitleElement.Title="The title is on the left"
|
||||
hc:InfoElement.Necessary="True"
|
||||
Theme="{StaticResource AutoCompleteBoxExtend.Small}"
|
||||
ItemsSource="{Binding DataList}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
FilterMode="Contains"
|
||||
Margin="0,16,0,0" />
|
||||
</StackPanel>
|
||||
</hc:UniformSpacingPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace HandyControlDemo.UserControl;
|
||||
|
||||
public partial class AutoCompleteBoxDemo : Avalonia.Controls.UserControl
|
||||
{
|
||||
public AutoCompleteBoxDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user