How to judge the current page? RRS feed

  • 问题

  • There are several pages like LoginPage, MainPage, RegisterPage in my app, how can I judge which page is the current page?
    2012年6月20日 8:55


  • Do you mean you navigate the Pages in one Frame control, and want to know which page is the current page?

    if (frame.Content is Page)
       // judge it via (frame.Content as Page).Name


    or you just navigate the Page in the current rootFrame in App. You could use the Window.Current property.


    Bob Bao [MSFT]
    MSDN Community Support | Feedback to us

    2012年6月21日 4:36