In Silverlight 4 app; what does this error mean?:
\"Error HRESULT E_FAIL has been returned from a call to a COM component.\"
It
Here's one way to generate this error, which I stumbled upon today. We have the following button in XAML:
The event handler that handles the button's Click
event is as follows:
private void Button_Click(object sender, RoutedEventArgs e)
{
button.Margin = new Thickness(0, double.NaN, 0, 0);
}
When I click on the button I get the aforementioned error. The same error arises if I replace NaN
with PositiveInfinity
or NegativeInfinity
.
Interestingly, I get a different error message if the first parameter of the Thickness
constructor contains the NaN
instead of the second.