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

SyntaxEditor for WPF Forum

Posted 3 years 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 3 years ago]

Comments (3)

Answer - Posted 3 years 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 3 years 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 3 years 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 (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.