How to keep the custom Settings Charm flyout open programmatically?

半腔热情 提交于 2019-12-05 12:36:05

What I did was grab a copy of the UserControl.Parent before the Picker is called and store it locally in the function, this prevents the UI handlers from marking it for collection, and after the picker returns, then select the parent IsOpen back to true.

for instance:

private function ()
{
    Popup popup = this.Parent as Popup;

    Picker Code

    popup.IsOpen = true;
}

It may not be the best by the book, but it does work well.

See if setting the IsLightDismissEnabled property of the flyout / popup to false will do the trick.

You can try to mimic PLM (Process life management) code so that whenever you your AlarmSettingsPane gets unloaded you save the content of the page and whenever it gets loaded back you reconstruct the state of the Control. you can find some sample code in layoutawarepage in VS Split or Grid template ..

regards,

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!