
I just upgraded to Windows 11 and I noticed that if the SyntaxEditor is using Metro Dark mode, the intelliprompt scrollbar uses the Windows scrollbar. If Windows is set to use light theme for apps the scrollbar is rendered in light mode as well, resulting in a jarring look.
My code:
Program.cs
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// Set the global color scheme
UIRendererManager.ColorScheme = WindowsColorScheme.MetroDark;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
Form1
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
syntaxEditor1.Document.Language.RegisterService(new DemoCompletionProvider());
}
}
public class DemoCompletionProvider : CompletionProviderBase
{
public override bool RequestSession(IEditorView view, bool canCommitWithoutPopup)
{
var session = new CompletionSession();
for (var i = 0; i < 10; i++)
session.Items.Add(new CompletionItem("Test " , null));
session.Open(view, view.Selection.SnapshotRange);
return true;
}
}
By the way, is there a way to attach files to a thread or insert images? I have a sample project and a screenshot.
[Modified 14 days ago]