title: How to execute a method right after a Page has been rendered?
body: <p>I'm writing a C# app that uses Page-controls to display some information. Here's what I would like to do...</p>
  
  <ol>
  <li>Load / Navigate to a page</li>
  <li>Display the actual page</li>
  <li>Then, execute a method immedtiately after the page is loaded and is already being displayed</li>
  </ol>
  
  <p>For step 1, I'm basically using</p>
  
  <pre><code>this.NavigationService.Navigate(new ThePage())
  </code></pre>
  
  <p>to load the page. The page's constructor as well as my event handling function is</p>
  
  <pre><code>public partial class ThePage : Page
    {
    public ThePage()
    {
      InitializeComponent();
      Loaded += new RoutedEventHandler(Page_Load);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
      MessageBox.Show("hey");
    }
  }
  </code></pre>
  
  <p>So what happens is that the MessageBox is being shown BEFORE that actualy page is displayed. I'd like to have it the other way around tho, I'd like the page to be displayed and THEN show the message box.</p>
  
  <p>I know I could use a timer, but it feels like this would be a crappy solution since I'd have to guess its interval and either risk making it too short, or otherwise artifially increasing loading time by setting its interval too long.</p>