DotNetKit.Wpf.AutoCompleteComboBox
DotNetKit.Wpf.AutoCompleteComboBox copied to clipboard
MaxSuggestionCount
Hello, I am using this control well. Have you ever wanted to change the MaxSuggestionCount inside AutoCompleteComboBoxSetting, is there a way? If yes, I would appreciate it if you could show me an example.
Quick answer: Create a class inheriting from AutoCompleteComboBoxSetting, override MaxSuggestionCount property, and bind an instance to AutoCompleteComboBox.Setting property. I hope someone write an example... :thinking:
Xaml
<dotNetKitControls:AutoCompleteComboBox
Grid.Row="0" Grid.Column="1"
Name="ComboBox"
Height="25">
</dotNetKitControls:AutoCompleteComboBox>
code-behind
public class AutoCompleteComboBoxSettingControl : AutoCompleteComboBoxSetting
{
public override int MaxSuggestionCount => int.MaxValue;
}
public partial class TestView : Window
{
public TestView()
{
InitializeComponent();
AutoCompleteComboBoxSettingControl test = new AutoCompleteComboBoxSettingControl();
ComboBox.Setting = test;
}
}
Thank you vain0x
I'll try a little harder and change it later so that I can do it with Code-behind-Zero.
Thanks again for the quick reply
Closing, it seems resolved.