We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

editcontrol language Syntax Highlighting in app.config

Thread ID:

Created:

Updated:

Platform:

Replies:

51907 Nov 16,2006 09:26 AM UTC Nov 20,2006 04:58 AM UTC Windows Forms 1
loading
Tags: EditControl
Alexandre Richonnier
Asked On November 16, 2006 09:26 AM UTC

Hello,

I have to highlight the log runtime, so I have defined a new language in the config.xml . But config.xml is one more configuration file in my project. My question is, Can we write a ConfigLanguage section in a application configuration file (app.config or user.config if user) and howto do it.

thank you for your help!

P.s.: I don't find a ConfigLanguage herited from 'System.Configuration.IConfigurationSectionHandler'.

David Union
Replied On November 20, 2006 04:58 AM UTC

editControl.Configurator.Open() can take a string. So you should be able to put the entire contents into some tags in the config section, read in that tag as an xml node of an xmldocument, and just use the .ToString() on that node as the input to this.

The other option, which I'm probably using, is to simply embed the xml as a resource in the project.

Add it to the project and set the property to 'embedded resource' in the IDE. Then you can keep the file separate and not have to distribute any other separate .xml file at all, it will be in the .exe or .dll of the project.

To get the file at runtime use:
Assembly.GetExecutingAssembly().GetManifestResourceStream()



>Hello,

I have to highlight the log runtime, so I have defined a new language in the config.xml . But config.xml is one more configuration file in my project. My question is, Can we write a ConfigLanguage section in a application configuration file (app.config or user.config if user) and howto do it.

thank you for your help!

P.s.: I don't find a ConfigLanguage herited from 'System.Configuration.IConfigurationSectionHandler'.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;