I am using RadSyntaxEditor to achieve functionality such as showing some overloading of function. But I have a problem when I need to change overloadListWindow.Presenter.OverloadListItems with new OverloadInfoCollection, UI part is not changed. I assume that this change doesn't fire INotifyPropertyChanged, and that is a reason why UI is not updated. In a case, we change overloadListWindow.Presenter.OverloadListItems like in a radButton1_Click event handler, there is no change until I use the arrows button on the keyboard (probably that is a time where is INotifyPropertyChanged event is fired). I was trying to do some workaround, and that was a case where I tried to clear this.radSyntaxEditor1.SyntaxEditorElement.IntelliPrompts.OverloadListWindow.Presenter.OverloadListItems but in that case, I got NullReferenceException even if instance is not null.
using System;
using System.Windows.Forms;
using Telerik.WinForms.Controls.SyntaxEditor.UI;
using Telerik.WinForms.Controls.SyntaxEditor.UI.IntelliPrompt.Overloading;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
OverloadInfoCollection overloadListA = new OverloadInfoCollection { new OverloadInfo("aaa", "aaa description") };
this.radSyntaxEditor1.SyntaxEditorElement.IntelliPrompts.OverloadListWindow.Presenter.OverloadListItems = overloadListA;
}
private void btnClear_Click(object sender, EventArgs e)
{
this.radSyntaxEditor1.SyntaxEditorElement.IntelliPrompts.OverloadListWindow.Presenter.OverloadListItems.Clear();
}
private void btnChange_Click(object sender, EventArgs e)
{
OverloadInfoCollection overloadListB = new OverloadInfoCollection { new OverloadInfo("bbb", "bbb description") };
OverloadListPopup overloadListWindow = this.radSyntaxEditor1.SyntaxEditorElement.IntelliPrompts.OverloadListWindow;
overloadListWindow.Presenter.OverloadListItems = overloadListB;
overloadListWindow.Refresh();
}
private void radButton1_Click(object sender, EventArgs e)
{
OverloadInfoCollection overloadListC = new OverloadInfoCollection { new OverloadInfo("ccc", "ccc description"), new OverloadInfo("ccc 1", "ccc 1 description") };
this.radSyntaxEditor1.SyntaxEditorElement.IntelliPrompts.OverloadListWindow.Presenter.OverloadListItems = overloadListC;
}
private void radSyntaxEditor1_DocumentContentChanged(object sender, Telerik.WinForms.SyntaxEditor.Core.Text.TextContentChangedEventArgs e)
{
this.radSyntaxEditor1.SyntaxEditorElement.IntelliPrompts.OverloadListWindow.Show();
}
}
}