Skip to content

Instantly share code, notes, and snippets.

@mwisnicki
mwisnicki / App.xaml.cs
Created July 13, 2012 13:45
[WPF] Handle Loaded event globally
using System;
using System.Windows;
namespace WpfLoadedClassHandler
{
/// <summary>
/// Shows how to globally handle Loaded event.
/// Workarounds bug: https://connect.microsoft.com/VisualStudio/feedback/details/511753/window-loadedevent-doesnt-work-properly-when-used-to-register-a-class-event-handler
/// Discussed: http://stackoverflow.com/questions/11455800/routed-event-class-handler-for-loadedevent-does-not-work-for-most-classes
/// </summary>
//
// UPnP.cs: UPnP Device Discovery Test.
//
// Authors:
// Eric Butler <eric@extremeboredom.net>
//
// (C) 2006 FileFind.net (http://filefind.net)
//
using System;