WPF Application using a global variable

前端 未结 6 2027
余生分开走
余生分开走 2020-12-08 11:10

I created a WPF application in c# with 3 different windows, Home.xaml, Name.xaml, Config.xaml. I want to declare a variable in Home.xaml.cs that I

6条回答
  •  北海茫月
    2020-12-08 11:40

    The proper way, especially if you ever want to move to XBAPP, is to store it in

    Application.Current.Properties
    

    which is a Dictionary object.

提交回复
热议问题