1) Does SyntaxEditor have ability for Automatic formatting C# code ?
I made the following settings for language of document :then I try to format document in the following way:
And get error:
"The language 'C#' needs to implement the 'FormatTextRange' method so that it can support code formatting."
What should I tune to achieve Automatic formatting for C#?
2) Issue with Generic IntelliSense via Ctrl+Space:
Is there a way to display Generic variables types correctly? Generic variable should contain name of type. Now I see that prompt for generic variable contains defenition like this: 'IList<T> myCollection', but should contain 'IList<MyType> myCollection'.
I am not able to display the methods and Properties of elements of my generics collection:3) I need to show Intellisense dialog when the user types 'Tab' in the code editing area like it is shown by Ctrl+Space.
I am doing that like this:It works. But it is still needed to insert 'tab' area after typing 'Tab' button.
As far as I understood it's not possible to have two commands bound on the one combinations of keys, so I have to delete predefined tab command. How can I insert tab area and show Intellisense dialog in this case?
I made the following settings for language of document :
editor.Document.Language = new CSharpSyntaxLanguage();
editor.Document.Language.FormatDocument(editor.Document);
"The language 'C#' needs to implement the 'FormatTextRange' method so that it can support code formatting."
What should I tune to achieve Automatic formatting for C#?
2) Issue with Generic IntelliSense via Ctrl+Space:
Is there a way to display Generic variables types correctly? Generic variable should contain name of type. Now I see that prompt for generic variable contains defenition like this: 'IList<T> myCollection', but should contain 'IList<MyType> myCollection'.
I am not able to display the methods and Properties of elements of my generics collection:
myCollection[0]. //<-Does not contain the corresponding members of MyType.
I am doing that like this:
CommandLink newTabCommandLink = null;
for (int index = editor.CommandLinks.Count - 1; index >= 0; index--)
{
CommandLink commandLink = editor.CommandLinks[index];
if ((commandLink.KeyBinding.Modifiers == ActiproSoftware.WinUICore.Input.ModifierKeys.Control) &&
(commandLink.KeyBinding.Key == Keys.Space))
{
newTabCommandLink = commandLink;
}
//remove the old command related with 'Tab' button.
if ((commandLink.KeyBinding.Modifiers == ActiproSoftware.WinUICore.Input.ModifierKeys.None) &&
(commandLink.KeyBinding.Key == Keys.Tab))
{
editor.CommandLinks.RemoveAt(index);
}
}
// Bind the command on pressing 'Tab' button.
if (newTabCommandLink != null && newTabCommandLink.Command != null)
{
editor.CommandLinks.Add(
new CommandLink(newTabCommandLink.Command,
new KeyBinding(ActiproSoftware.WinUICore.Input.ModifierKeys.None, Keys.Tab)));
}
As far as I understood it's not possible to have two commands bound on the one combinations of keys, so I have to delete predefined tab command. How can I insert tab area and show Intellisense dialog in this case?