Unable to resolve property '%1' while processing properties for Uid '%0'

631 views Asked by At

I'm trying to localize my WP 8.1 app.

Here is a part of Strings/en-us/Resources.resw:

<data name="SampleProperty.Text" xml:space="preserve">
    <value>Sample text</value>
</data>
<data name="SampleProperty.SomeRandomKey" xml:space="preserve">
    <value>SAMPLE TEXT</value>
</data>

Also one of application pages contains the following code:

<TextBlock x:Uid="SampleProperty" />

But the app throws an exception in process of navigation to that page:

WinRT information: Unable to resolve property '%1' while processing properties for Uid '%0'. [Line: 167 Position: 24]
Additional information: The text associated with this error code could not be found.

If I remove SampleProperty.SomeRandomKey from the resource dictionary then all works fine. But this string is used in another part of my app.

Where can be the problem?

UPD

I've added properties like in the sample from the documentation:

<data name="SampleProperty.Text" xml:space="preserve">
    <value>Sample text</value>
</data>
<data name="SampleProperty.Width" xml:space="preserve">
    <value>0</value>
</data>

All works fine. But I can't understand why this works and why the first case gives the exception...

1

There are 1 answers

1
MakanWG On BEST ANSWER

It is unclear what "SomeRandomKey" is in your example, and what you are trying to achieve with it. But this exception is thrown because TextBlocks don't have a SomeRandomKey property. They have Text, Width, but definitely not "SomeRandomKey". Just remove it.