App throws exception if property value is mis-spelled

If I use the proper English spelling of "Grey", I receive a runtime exception that isn't very helpful.

eg.<CanvasBackground="Grey">

FatalExecutionEngineError was detected
Message: The runtime has encountered a fatal error. The address of the error was at 0x7f570c2b, on thread 0xb8c. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.

Granted the Xaml view does underline the word and provide a tooltip, if I hover over it, telling me its invalid. If I miss this though, I can still compile and crash without any idea of what caused it.

Also, bad capitalization results in the same Xaml view feedback, but does not result in an exception.

eg.Stroke="black"

User error obviously, but the sometimes you have to protect people like from their own stupidity

:)

NIK

[1459 byte] By [NickNotYet] at [2008-2-26]
# 1

Yes, fair enough. We'll do more when you're inside VS to prevent this, but that work will come online later as we implement an actual XAML language service to replace the simple XSD.

We are also working closely with the VS debugging team to improve the experience for common runtime errors, like this one.

Your example is a great poster child to motivate doing the right thing, so thanks for that :-)

chad

chadr-msft at 2007-9-10 > top of Msdn Tech,Visual Studio Orcas,WPF Designer (Cider)...

Visual Studio Orcas

Site Classified