Skip to content

Instantly share code, notes, and snippets.

Say you are in a world where you want to use progressive enhancement (sometimes for accessibility)
with ASP.NET MVC 3+.
Progressive Enhancement means the site WORKS WITHOUT JAVASCRIPT FOLKS.
Now say you have something like comments that will be on multiple pages.
You want the site to be maintainable so you want to use a partial with
form submission.
@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 <[email protected]>
//
// (C) 2006 FileFind.net (http://filefind.net)
//
using System;