Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2150
UltraTextEditor causing forms to be created and disposed rapidly
posted

I have a WPF app with some winforms integration.  Occasionally I will open a legacy winforms Modal Form, lets call it "UfpProductPopupForWpf".

In some circumstances which I haven't been able to identify, the UltraTextEditor seems to create and dispose a whole ton of Windows Forms in the background, for no obvious reason.  See the Form disposal callstack below.  My theory at this time is that it happens when no other winforms cruft is created in the app.  However, if there is a WindowsFormsHost element visible somewhere on the screen already, I don't seem to get all the weird activity (creation and disposal of Windows Forms).   The difference in performance is around 30 seconds.

Here is a callstack:

>               System.Windows.Forms.dll!System.Windows.Forms.Form.Dispose(bool disposing)      Unknown

                System.dll!System.ComponentModel.Component.Dispose()            Unknown

                Infragistics4.Win.v16.1.dll!Infragistics.Win.DrawUtility.DecrementReferenceFormCounter()        Unknown

                Infragistics4.Win.v16.1.dll!Infragistics.Win.DrawUtility.ReleaseCachedGraphics(System.Drawing.Graphics g)       Unknown

                Infragistics4.Win.UltraWinEditors.v16.1.dll!Infragistics.Win.UltraWinEditors.TextEditorControlBase.ShouldAutoSizeHeight(out int height)         Unknown

                Infragistics4.Win.UltraWinEditors.v16.1.dll!Infragistics.Win.UltraWinEditors.TextEditorControlBase.SetBoundsCore(int x, int y, int width, int height, System.Windows.Forms.BoundsSpecified specified)           Unknown

                System.Windows.Forms.dll!System.Windows.Forms.Control.ScaleControl(System.Drawing.SizeF factor, System.Windows.Forms.BoundsSpecified specified) Unknown

                System.Windows.Forms.dll!System.Windows.Forms.Control.ScaleControl(System.Drawing.SizeF includedFactor, System.Drawing.SizeF excludedFactor, System.Windows.Forms.Control requestingControl)    Unknown

                System.Windows.Forms.dll!System.Windows.Forms.Control.Scale(System.Drawing.SizeF includedFactor, System.Drawing.SizeF excludedFactor, System.Windows.Forms.Control requestingControl)           Unknown

                System.Windows.Forms.dll!System.Windows.Forms.Control.ScaleChildControls(System.Drawing.SizeF includedFactor, System.Drawing.SizeF excludedFactor, System.Windows.Forms.Control requestingControl)              Unknown

                System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.Scale(System.Drawing.SizeF includedFactor, System.Drawing.SizeF excludedFactor, System.Windows.Forms.Control requestingControl)  Unknown

                System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.PerformAutoScale(bool includedBounds, bool excludedBounds)       Unknown

                System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.PerformNeededAutoScaleOnLayout() Unknown

                System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.OnLayoutResuming(bool performLayout)             Unknown

                System.Windows.Forms.dll!System.Windows.Forms.Control.ResumeLayout(bool performLayout)          Unknown

                UFP.LumberTrack.Shared.Windows.dll!UFP.LumberTrack.Shared.Windows.LookupControls.UfpBaseLookup.InitializeComponent() Line 96    C#

Notice the call to Infragistics.Win.DrawUtility.DecrementReferenceFormCounter which does seem to dispose of a form (which form? I do not know).  It gets called over and over for every UltraTextEditor.

There is no obvious impact to the behavior of the app other than a massive 30 second delay to open "UfpProductPopupForWpf" in some cases, and instant responses to open that form in others.

Any theories?  How can I get this thing to open fast in every case?