c# - Navigation from OnDoubleTapped method -


i've created customized pushpin ( windows store) , need navigate whenever control double tapped/clicked

so figured out ondoubletapped(doubletappedroutedeventargs e) it,but when tried .. didn't work. following code control code-behind

protected async override void ondoubletapped(doubletappedroutedeventargs e)         {             base.ondoubletapped(e);             frame.navigate(typeof(target)); //frame has no navigate()         } 

this can solved using dispatcher :

dispatcher.runasync(windows.ui.core.coredispatcherpriority.normal, new dispatchedhandler(() =>             {                 frame thisframe = window.current.content frame;                 window.current.activate();                 thisframe.navigate(typeof(target));             })); 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -