c# - Navigate to next page in xamarin forms on tap gesture -


i have click event label go next page in xamarin forms not able proper statement move on next page main page. have used following code.

var forgetpassword_tap = new tapgesturerecognizer(); forgetpassword_tap.tapped += (s, e) => {     // app.current.mainpage = mycontentpage;     app.current.mainpage = new navigationpage();     app.current.mainpage.navigation.pushasync(page:mycontentpage()); }; forgetpasswordlabel.gesturerecognizers.add(forgetpassword_tap); 

in above statement got error "mycontentpage" not valid argument.

if instance of page mycontentpage has been created, ought it:

app.current.mainpage = new navigationpage(mycontentpage); 

if not, , mycontentpage type, not instance:

app.current.mainpage = new navigationpage(new mycontentpage()); 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -