locked
Pivot App Title for Windows Phone 8.1 RRS feed

  • Question

  • There is a bug when you create a new pivot app and try to change the title.

    <pivot .. title="MY APPLICATION">

    stays "MY APPLICATION", even if I erase it.


    don't stop trying.

    Saturday, August 2, 2014 11:13 PM

Answers

  • It's not a bug. The project is set up to use string resources, for language support. The Pivot title is assigned from a string resource, not the xaml.

    In the Solution Explorer, look for a Resources.resw file in the Strings project folder. Mine is in the subfolder en-US (for English language, US culture).

    Double click on Resources.resw to open it in a resource editor. It contains strings to be loaded by the app.  Notice a string resource named "Pivot.Title" with value "MY APPLICATION".

    Now look at the pivot in PivotPage.xaml:

            <Pivot x:Uid="Pivot" Title="MY APPLICATION" x:Name="pivot" ...

    Notice it was given a Uid of "Pivot". The string resource "Pivot.Title" is associated with Uid "Pivot" and property "Title".

    You have some choices to set the pivot title you want:

    1. Delete the x:Uid property from the Pivot. The value in the xaml will be used.
    2. In Resources.resw, replace "MY APPLICATION" with the string you want. This approach is preferable because the project is already set up to use string resources. You can support additional languages by simply adding a Resources.resw file for each new language.



    • Proposed as answer by mSpot Inc Sunday, August 3, 2014 8:42 AM
    • Marked as answer by SleepSux Sunday, August 3, 2014 8:59 PM
    • Edited by mSpot Inc Monday, August 25, 2014 8:48 AM
    Sunday, August 3, 2014 8:36 AM

All replies

  • It's not a bug. The project is set up to use string resources, for language support. The Pivot title is assigned from a string resource, not the xaml.

    In the Solution Explorer, look for a Resources.resw file in the Strings project folder. Mine is in the subfolder en-US (for English language, US culture).

    Double click on Resources.resw to open it in a resource editor. It contains strings to be loaded by the app.  Notice a string resource named "Pivot.Title" with value "MY APPLICATION".

    Now look at the pivot in PivotPage.xaml:

            <Pivot x:Uid="Pivot" Title="MY APPLICATION" x:Name="pivot" ...

    Notice it was given a Uid of "Pivot". The string resource "Pivot.Title" is associated with Uid "Pivot" and property "Title".

    You have some choices to set the pivot title you want:

    1. Delete the x:Uid property from the Pivot. The value in the xaml will be used.
    2. In Resources.resw, replace "MY APPLICATION" with the string you want. This approach is preferable because the project is already set up to use string resources. You can support additional languages by simply adding a Resources.resw file for each new language.



    • Proposed as answer by mSpot Inc Sunday, August 3, 2014 8:42 AM
    • Marked as answer by SleepSux Sunday, August 3, 2014 8:59 PM
    • Edited by mSpot Inc Monday, August 25, 2014 8:48 AM
    Sunday, August 3, 2014 8:36 AM
  • wow! thank you for the thorough explanation! 

    don't stop trying.

    Sunday, August 3, 2014 9:01 PM