CodeCompletionBox

Hello
Currently I have a button which shows the CodeCompletionBox. I simply call (C#/Winforms):
syntaxEditSnippet.CompleteWord();
I would like the box that appears to initially be filtered to show only Fields and Classes. I can't seem to figure out how to accomplish that. (Same thing if they just press the period). Please help.
Hello Kabe,
you should use such approach for Roslyn-based parser:
using Alternet.Editor;
using Alternet.Editor.CodeCompletion;
using Alternet.Syntax.Parsers.Roslyn.CodeCompletion;
class MyCodeCompletionBox : CategorizedCodeCompletionBox
{
public MyCodeCompletionBox(Control owner) : base(owner)
{
}

protected override void DoShow(Point position)
{
base.DoShow(position);

if (CategoriesIncludedInFilter == null || !CategoriesIncludedInFilter.Any())
{
var categories = CategorizedProvider?.GetAvailableCategories()?.Where(
x => x.Id == MemberImageIndex.Class.ToString() || x.Id == MemberImageIndex.Field.ToString())?.ToArray();
if (categories != null && categories.Any())
CategoriesIncludedInFilter = categories;
}
}
}
class MySyntaxEdit : SyntaxEdit
{
protected override ICodeCompletionBox CreateCodeCompletionBox()
{
return new MyCodeCompletionBox(this);
}
}
Regards,
Andrew
Perfect - thanks!