Saving/Restoring view state works strange with Russian language.

May 19, 2014 at 11:58 AM
Hello.
I am saving/restoring view state using code from this post http://www.davidbritch.com/2014/02/saving-and-restoring-view-state-with.html . The problem is that it does not work correctly when I am using Russian localization(I also tried Chinese, Japanese, Malaysian, English languages, everything works fine).

I captured short video from my app: http://www.youtube.com/watch?v=7N50KFsEdDE
Source code: https://bitbucket.org/TocoToucan/aniwall

Then, as an experiment, I took example from blog post and modified it a bit (I added resource files for localization and x:Uid stuff to XAML elements).
I captured another one short video: http://www.youtube.com/watch?v=3q3idxiMchI
Source code: https://bitbucket.org/TocoToucan/photoviewer-save-view-state

Can anybody explain me this magic?
Thanks in advance.
May 19, 2014 at 7:18 PM
Hello,

I would invite you to propose an issue on the Issues section, and vote it so the P&P Team would look into it and they could keep track of every issue and suggestion, giving more priority on fixing the most voted ones.

However, the first shared video ma not show the app suspending and restoring. Have the Russian language worked at least once when saving the state?

Regards.
Gabriel Ostrowsky
https://blogs.southworks.net/gostrowsky
May 21, 2014 at 3:11 PM
Changing
scrollViewerOffsetProportion = double.Parse(pageState["ScrollViewerOffsetProportion"].ToString(), CultureInfo.InvariantCulture.NumberFormat);
to
_scrollViewerOffsetProportion = (double)pageState["ScrollViewerOffsetProportion"];
in View's(code-behind) LoadState method fixed my problem.
Marked as answer by TocoToucan on 5/21/2014 at 8:12 AM