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

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

Why does PHP consider 0 to be equal to a string? -

formula - R: how to pass in a reference to the variable in glm or lm? -