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
Post a Comment