Best practice for sharing data between pages

前端 未结 2 1336
渐次进展
渐次进展 2020-12-19 04:19

I was wondering what the best practice is for sending variables like \'selectedItem\' and so on between pages in UWP? Is it a good idea to just create a static global variab

2条回答
  •  我在风中等你
    2020-12-19 04:58

    Well in fact if you use MVVM approach you have all necessary info in ModelView class(es). In case you do not use MVVM just use a singleton class or even a static global class.

提交回复
热议问题