So, I have a control that calls UpdateLayout () in response to its mutable elements. This results in a stack trace that looks like this:
Description: The application requested completion of the process through System.Environment.FailFast (string message). Message: Unrecoverable system error. Stack: in System.Environment.FailFast (System.String) in MS.Internal.Invariant.FailFast (System.String, System.String) in MS.Internal.Invariant.Assert (Boolean, System.String) in System.Windows. Window.GetWindowMinMax () in System.Windows.Window.MeasureOverride (System.Windows.Size) in System.Windows.FrameworkElement.MeasureCore (System.Windows.Size) in System.Windows.UIElement.Measure (System.Windows.Size) in System.Windows.ContextLayoutManager.UpdateLayout () in System.Windows.UIElement.UpdateLayout () in
Obviously, in some circumstances, GetWindowMinMax () does not have Assert () of some type that calls the Environment.FailFast call. What conditions can I check before calling UpdateLayout to make sure that these circumstances do not occur in order to avoid this error?
source
share