WPF Reflections

Oct 22 2008   9:58AM GMT

WPF – Loaded event in browser applications



Posted by: MarkWPF
WPF

This is a slightly strange one to my thinking.

If you have a loaded event in a panel on a page, it will get fired multiple times.
This goes against the behaviour of a WPF application (or Winforms for that matter).
I don’t know if the same is true for an Asp.Net forms application, since I haven’t done many.

It seems to be using the Loaded event as more of an Activated event.

To see this behaviour easily:

  1. Create a WPF browser application (xbap)
  2. Add a tab control
  3. Add a panel to 1 tab
  4. Add another panel to another tab
  5. do something in Loaded event in first tab , eg change colour of the panel

When you click on second tab and back to first tab, the loaded event will be fired again

 

Comment on this Post

Leave a comment: