This project is read-only.


NullReferenceException in VS 2012 designer


I see the following exception in the Visual Studio 2012 WPF designer.

NullReferenceException: Object reference not set to an instance of an object.

The full stack trace is attached.

file attachments

Closed Sep 10, 2013 at 8:23 AM by EricJensen


cjl wrote Sep 6, 2013 at 4:32 PM

To fix this, download the source code

find the ToggleSwitch.Utils.tualSizePropertyProxy class

replace the OnElementPropertyChanged method to:
private static void OnElementPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    if (d != null && e != null)

wrote Sep 10, 2013 at 8:23 AM

wrote Sep 10, 2013 at 8:49 AM