DotNetKit.Wpf.AutoCompleteComboBox icon indicating copy to clipboard operation
DotNetKit.Wpf.AutoCompleteComboBox copied to clipboard

MaxSuggestionCount

Open flycoflyco opened this issue 3 years ago • 2 comments

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.

flycoflyco avatar Jan 26 '22 07:01 flycoflyco

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:

vain0x avatar Jan 26 '22 10:01 vain0x

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

flycoflyco avatar Jan 27 '22 00:01 flycoflyco

Closing, it seems resolved.

vain0x avatar Apr 02 '23 02:04 vain0x