How can I enable syntax highlighting and intellipromt when pressing a button

SyntaxEditor for WPF Forum

Posted 6 months ago by Abdulmalik Seyfi
Version: 19.1.1
Avatar

Hello lads

I'm new to Actipro controls for WPF

I've added a SyntaxEditor control and I tried to set a language highlight and intellipromt but it didn't work

I've tried this but I got a compilation error

syntaxEditor.Language = new CSharpSyntaxLanguage();

[Modified 6 months ago]

Comments (3)

Answer - Posted 6 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

That Language property you tried setting is inherited from WPF's FrameworkElement and is for globalization purposes. 

You want to set the syntax language instance on our Document object used by SyntaxEditor instead.  Like this:

syntaxEditor.Document.Language = new CSharpSyntaxLanguage();


Actipro Software Support

Posted 6 months ago by Abdulmalik Seyfi
Avatar

Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'CsharpSyntaxLanguage' could not be found (are you missing a using directive or an assembly 

Posted 6 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

You are probably missing an assembly reference here.  Use of the .NET Languages Add-on's CSharpSyntaxLanguage class would require you to reference these assemblies:

  • ActiproSoftware.Shared.Wpf.dll
  • ActiproSoftware.Text.Wpf.dll
  • ActiproSoftware.SyntaxEditor.Wpf.dll
  • ActiproSoftware.Text.LLParser.Wpf.dll
  • ActiproSoftware.Text.Addons.DotNet.Wpf.dll
  • ActiproSoftware.SyntaxEditor.Addons.DotNet.Wpf.dll


Actipro Software Support

The latest build of this product (v21.1.2) was released 20 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.