String appearing blank when trying to use it in 2 different components

Apptacular Apps 386 Reputation points

I'm trying to use the same string resource for 2 different components but they both appear blank. How can this problem be fixed?


  • ContactUs.Label - Contact Us
  • ContactUs.Text - Contact Us

Main page

        <AppBarButton Name="AppBarButtonContactUs" x:Uid="ContactUs.Label"/>

2nd page

        <TextBlock x:Uid="ContactUs.Text" Style="{StaticResource HeaderTextBlockStyle}" />
Universal Windows Platform (UWP)
{count} votes

2 answers

Sort by: Most helpful
  1. Daniele 1,991 Reputation points

    The reason of "Unable to resolve property 'Text' while processing properties for x:Uid 'ContactUs'." is that AppBarButton has x:Uid ContactUs but no property Text, the x:Uid must be different if the target property is different.

    You can do like that:

       <TextBlock x:Uid="ContactUs_Text" />  
       <AppBarButton x:Uid="ContactUs_Label" />  

    and in Resource.resw


    1 person found this answer helpful.
    No comments

  2. Matt Lacey 786 Reputation points MVP

    Set the Uid of both to be "ContactUs".

    Have two resource entries
    "ContactUs.Label" and "ContactUs.Text" which both have the same value.