StaticExtension value cannot be resolved

When using Visual Studio to create a WPF application (XAML), sometimes there is a problem with the WPF binding. For example, when binding resource files to make an application multilingual.

If you want to bind the strings to a WPF element, then you may get the following error message:

StaticExtension value cannot be resolved to an enumeration, static field, or static property

Unfortunately, the error message is not very informative, so you start experimenting around and waste a lot of time.

Screenshot WPF application error message
WPF application error message

The reason why the StaticExtention value cannot be resolved is that the resource values do not have the correct Access Modifier. This must be set to “Public” so that the error message disappears.

Screenshot Visual Studio change resource file to public
Switch to “Public

If the Access Modifier is set to Public, the WPF application can be compiled again without error messages.

Leave a Reply

Your email address will not be published. Required fields are marked *