Hi guys,
I have reached the point in the development of my application where I would like to provide an interface for editing the color and style of the various identifiers in the syntax languages used in my application. From the documentation and the provided quick start example, it would seem that this has been changed quite a bit in the WPF version, when compared to SyntaxEditor for WinForms. Despite having read the documentation on this at least a couple of times now, I'm not really sure that I understand this new Ambient registry, but it doesn't seem to be what I need. In your sample, there's just a big pile of "classification types", which appears to be from several languages, and yet it seems that they share some of the styles. This is not at all what I want. I would like to do things just like you did in the demo for the WinForms version, where I can select a language and THEN edit the styles for it. Unfortunately, after messing around with it for an hour or so, I'm still not sure how to do it.
I therefore hope that you can point me in the right direction here. I have a list of the syntax languages that I wish to support and a reference to their .langdef files. But how do I get their styles (besides manually parsing the XML files, which I don't suppose is the meaning)? From the documentation it seems that I need a highlighting style registry, but I'm not really sure how to get that? I would expect to be able to access this on the SyntaxLanguage instance that I initialize when loading a language, but that doesn't seem to be the case?
Also, I tried creating a test-UI for this, where I just bound a ListView to the AmbientHighlightingStyleRegistry.Instance.HighlightingStyles, since this is the only place where I know how to get a collection of styles for experimenting :). However, it doesn't seem that the HighlightingStyle instances I get, has a name or a description or any other identifier for my interface. Should I use classification types instead? I'm a bit confused on this, even after reading the documentation :)
I have reached the point in the development of my application where I would like to provide an interface for editing the color and style of the various identifiers in the syntax languages used in my application. From the documentation and the provided quick start example, it would seem that this has been changed quite a bit in the WPF version, when compared to SyntaxEditor for WinForms. Despite having read the documentation on this at least a couple of times now, I'm not really sure that I understand this new Ambient registry, but it doesn't seem to be what I need. In your sample, there's just a big pile of "classification types", which appears to be from several languages, and yet it seems that they share some of the styles. This is not at all what I want. I would like to do things just like you did in the demo for the WinForms version, where I can select a language and THEN edit the styles for it. Unfortunately, after messing around with it for an hour or so, I'm still not sure how to do it.
I therefore hope that you can point me in the right direction here. I have a list of the syntax languages that I wish to support and a reference to their .langdef files. But how do I get their styles (besides manually parsing the XML files, which I don't suppose is the meaning)? From the documentation it seems that I need a highlighting style registry, but I'm not really sure how to get that? I would expect to be able to access this on the SyntaxLanguage instance that I initialize when loading a language, but that doesn't seem to be the case?
Also, I tried creating a test-UI for this, where I just bound a ListView to the AmbientHighlightingStyleRegistry.Instance.HighlightingStyles, since this is the only place where I know how to get a collection of styles for experimenting :). However, it doesn't seem that the HighlightingStyle instances I get, has a name or a description or any other identifier for my interface. Should I use classification types instead? I'm a bit confused on this, even after reading the documentation :)