3
votes

to make my Application localizable I use a method from this blog:

http://www.rhyous.com/2010/10/20/using-resources-resx-for-strings-in-a-wpf-application-a-technique-to-prepare-for-localization/

So i have controls defined like this to get the strings from the Resource file :

<Label Content="{x:Static p:Resources.btn_tooltip_edit}"/>

This works fine.

To make my control styles reusable I pack them into an extra Resource Dictionary File.

The Problem is when i want to access the Resource File (.resx) from the Resource Dictionary (.xaml) its not possible and a XAMl Parse Exception (System.Windows.Markup.StaticExtension) is thrown.

<Setter Property="ToolTip" Value="{x:Static p:Resources.btn_tooltip_edit}"/>

Whats wrong?

Is it possible to access the Resource Files from a Style File?

1

1 Answers

0
votes

Change the access modifier of Resource File from internal to public.