Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 app.xaml.cs 中的 _Activated 事件上,我想在应用程序激活下的 app.xaml.cs 页面上启动一个带有结果的消息框,但要在不同的页面上检索结果。我可以做前者,但不能做后者。
我不确定启动一个MessageBoxinApp.xaml.cs是一个好习惯,但如果你真的需要这样做,你可以将结果存储在App类的变量中。然后,您将能够从任何页面读取该变量。
MessageBox
App.xaml.cs
App