Ribbon - Resource Dictionnaries

Ribbon for WPF Forum

Posted 5 years ago by Stephane Franiatte
Version: 14.2.0610
Avatar

Hi,

for some reason, my solution's Application.xaml is unable to propagate a ResourceDictionary to another project in my solution. I get a XamlParse error when initializing components (i.e. InitializeComponent in the code-behind), meaning that this ResourceDictionary is missing.

When I use a Fluent RibbonWindow, it works fine.

When I use Actipro's, I get the exception.

Another thing I noticed, this happens ONLY when my application is loading in another language than English; I can't see where is the link here... maybe you will.

We are about to purchase Actipro software, if only we could get rid of this exception.

Thank you for your reply, I can't wait to read it.

Comments (3)

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

Hi Stephane,

We have a lot of customers who use our products on non-English systems and everything works fine for them.  Could you provide some more detail on what your scenario and the problem are?  Sorry but from your description, it isn't quite clear.  Thanks!


Actipro Software Support

Posted 5 years ago by Stephane Franiatte
Avatar

Well, leaving aside the language (the problem anyway is not using one language or another, it is rather having the possibility to switch; my application provides 3 different languages; I get this exception when i use something else than english; however, I do not yet have resources for every languages, only english...is it a lead?), what could prevent a project Modules.A in my solution from accessing styles (i.e. resource dictionaries) specified in another project B?

Application.xaml, in project B (forget about Fluent here; I did use Actipro's stuff during the tests):

<Application x:Class="Application"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Application.Resources>
        
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/Modules.A;component/Resources/ValidationErrorTemplateStyle.xaml" />
                <ResourceDictionary Source="pack://application:,,,/B;component/Resources/ControlStyles.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Office2010/Silver.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Generic.xaml" />
            </ResourceDictionary.MergedDictionaries>

            <SolidColorBrush x:Key="grpBoxBorderBrush" Color="#FF3E87F0"/>
            <SolidColorBrush x:Key="headerPropertiesBackgroundColor" Color="#FF01949B"/>
            <Thickness x:Key="grpBoxBorderThickness">2</Thickness>
            <SolidColorBrush x:Key="grpBoxBorderForeground" Color="Black"/>
        </ResourceDictionary>
    </Application.Resources>
</Application>

 In all of the View's code-behinds in project Modules.A, InitializeComponent (http://stackoverflow.com/questions/245825/what-does-initializecomponent-do-and-how-does-it-work-in-wpf) cannot find ValidationErrorTemplateStyle.xaml. But it can when I am NOT using Actipro's RibbonWindow. SO, if it is clearer for you now, could you please tell what is going on, or what am I doing wrong?

Thank you very much

[Modified 5 years ago]

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

Hi Stephane,

The only time we touch the Application.Resources is with our ThemeManager.  The ThemeManager will add/remove ResourceDictionaries to the Application.Resources.  However it is designed to only ever be touching its own dictionaries and shouldn't be affecting any of yours that you defined.

If you can't figure it out, I would suggest making a new very simple sample project that shows it happening with the bare minimum code needed to repro it and send that to our support address.  Reference this thread and be sure to rename the .zip file extension so it doesn't get spam blocked.  Then we can debug it and see what's going on.  Sorry but I'm not sure what could be causing your issue without debugging it.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.