2

Closed

NullReferenceException in VS 2012 designer

description

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

comments

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)
    {
        ((ActualSizePropertyProxy)d).OnElementChanged(e);
    }
}

wrote Sep 10, 2013 at 8:23 AM

wrote Sep 10, 2013 at 8:49 AM