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

SyntaxEditor for WPF Forum

The latest build of this product (v2020.1.1) was released 2 months ago, which was before this thread was created.
Posted 10 days ago by Abdulmalik Seyfi
Version: 19.1.1

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 10 days ago]

Comments (3)

Answer - Posted 10 days ago by Actipro Software Support - Cleveland, OH, USA


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 2 days ago by Abdulmalik Seyfi

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 2 days ago by Actipro Software Support - Cleveland, OH, USA


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

Add Comment

Please log in to a validated account to post comments.