FontBrush for Syntax Highlighting

SyntaxEditor for WPF Forum

Posted 5 years ago by Tim Torrisi
Version: 15.1.0621
Avatar

We recently purchased a license for SyntaxEditor after a successful trial.  Everything was working perfectly in the previous version, but now I have implemented SyntaxEditor (the 2015.1 version) and I am getting a warning on build that states "Cannot find resource named 'FontBrush'. Resource names are case sensitive."

I put this same build into the old project, and it works as expected.  The only significant difference between the two is that we offloaded our default styles into a separate DLL that we share across several of our projects.  Does SyntaxEditor have a difficult time navigating to resources in a situation such as this one?  Has anyone else run into a similar issue, and if so, how was it resolved?  I'm one of out more junior developers, and by no means an expert in WPF, so details are much appreciated.

 

Thanks,

Tim Torrisi

Comments (1)

Answer - Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tim,

I did a search through our SyntaxEditor and Shared Library code and don't see anything named FontBrush anywhere in the code.  It must be something your team has defined in the styles in your DLL.

If you are referencing a keyed resource named FontBrush that is defined within your styles in a separate DLL, and referencing it via StaticResource in your app, I could see that sort of error happening.  I would recommend you search on the web for that error message and you should find more general guidance on how to structure resources better in your app so that they can be referenced properly.  Learning how StaticResource and DynamicResource work, along with how to put resources in your app's resources, is very important when putting styles, etc. in other DLLs.  There's a lot of good documentation out there for that sort of thing.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.