如何在不使用 UWP C# 中的导航的情况下从一页获取变量到另一页?
How can I get Variable from One Page To Other Page withput using navigation In UWP C#?
我需要帮助..
[]
_eMARTimer.Stop();
_faxTimer.Stop();
_faxRingtoneTimer.Stop();
这是我的主页,我想从第二页的 .cs 页面执行此页面中的这些方法]1
What can I do in IF loop for excute that prog ?
请帮我解决这个问题。
非常感谢您的专注。
I want to excute these method in thin page from .cs page which is in second page
对于这种场景,可以使用mvvmlight Messenger
来处理。而如果对方页面和发送页面不在同一个window。您需要在 xaml.
中设置其他 page NavigationCacheMode="Required"
public MainPage()
{
this.InitializeComponent();
Messenger.Default.Register<bool>(this,(s) =>
{
if (s)
{
_eMARTimer.Stop();
_faxTimer.Stop();
_faxRingtoneTimer.Stop();
}
});
}
第二页
Messenger.Default.Send<bool>(true);
我需要帮助.. []
_eMARTimer.Stop();
_faxTimer.Stop();
_faxRingtoneTimer.Stop();
这是我的主页,我想从第二页的 .cs 页面执行此页面中的这些方法]1
What can I do in IF loop for excute that prog ?
请帮我解决这个问题。 非常感谢您的专注。
I want to excute these method in thin page from .cs page which is in second page
对于这种场景,可以使用mvvmlight Messenger
来处理。而如果对方页面和发送页面不在同一个window。您需要在 xaml.
page NavigationCacheMode="Required"
public MainPage()
{
this.InitializeComponent();
Messenger.Default.Register<bool>(this,(s) =>
{
if (s)
{
_eMARTimer.Stop();
_faxTimer.Stop();
_faxRingtoneTimer.Stop();
}
});
}
第二页
Messenger.Default.Send<bool>(true);