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
385
Getting the Cursor causes a resize on the underlying control
posted

Hi,

I observed a strange behavior with cursors. When I check the current cursor, I get a resize event. Could you explain that?

statement:
UserControl.Cursor != Cursor.Default

causes the following stack trace below. Somehow the infragistics library changes the bounds of the control while checking the control's cursor. It is especially strange, as we do not set the cursor but only get the cursor value.

Regards,
Reto


 
     AvaloqControls.dll!Avaloq.Framework.ClientTier.SmartClient.Presentation.AvaloqControls.Containers.AvaloqForm.OnSizeChanged(System.EventArgs e = {System.EventArgs}) Line 1243    C#
     System.Windows.Forms.dll!System.Windows.Forms.Control.UpdateBounds(int x, int y, int width, int height, int clientWidth, int clientHeight) + 0x9c bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.UpdateBounds() + 0xd1 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.WmWindowPosChanged(ref System.Windows.Forms.Message m = {msg=0x47 (WM_WINDOWPOSCHANGED) hwnd=0xf0f3a wparam=0x0 lparam=0x435bf9c result=0x0}) + 0x1d bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) + 0x24c bytes   
     System.Windows.Forms.dll!System.Windows.Forms.ScrollableControl.WndProc(ref System.Windows.Forms.Message m) + 0x2a bytes   
     System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.WndProc(ref System.Windows.Forms.Message m) + 0x10 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.UserControl.WndProc(ref System.Windows.Forms.Message m) + 0x10 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) + 0x10 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x31 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg = 71, System.IntPtr wparam, System.IntPtr lparam) + 0x57 bytes   
     [Native to Managed Transition]   
     [Managed to Native Transition]   
     System.Windows.Forms.dll!System.Windows.Forms.Control.SetBoundsCore(int x, int y, int width, int height, System.Windows.Forms.BoundsSpecified specified = None) + 0x162 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.SetBounds(System.Drawing.Rectangle bounds, System.Windows.Forms.BoundsSpecified specified) + 0x5e bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Layout.DefaultLayout.xLayoutDockedControl(System.Windows.Forms.Layout.IArrangedElement element, System.Drawing.Rectangle newElementBounds, bool measureOnly, ref System.Drawing.Size preferredSize, ref System.Drawing.Rectangle remainingBounds) + 0x34 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Layout.DefaultLayout.LayoutDockedControls(System.Windows.Forms.Layout.IArrangedElement container, bool measureOnly = false) + 0x138 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Layout.DefaultLayout.xLayout(System.Windows.Forms.Layout.IArrangedElement container = {Avaloq.Framework.ClientTier.SmartClient.Presentation.AvaloqControls.Containers.UseCaseModalDialogContainer}, bool measureOnly = false, out System.Drawing.Size preferredSize = {Width = -7103 Height = -7105}) + 0x123 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Layout.DefaultLayout.LayoutCore(System.Windows.Forms.Layout.IArrangedElement container, System.Windows.Forms.LayoutEventArgs args) + 0x19 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Layout.LayoutEngine.Layout(object container, System.Windows.Forms.LayoutEventArgs layoutEventArgs) + 0x1b bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.OnLayout(System.Windows.Forms.LayoutEventArgs levent) + 0x83 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.ScrollableControl.OnLayout(System.Windows.Forms.LayoutEventArgs levent) + 0x43 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.OnLayout(System.Windows.Forms.LayoutEventArgs e) + 0x19 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.PerformLayout(System.Windows.Forms.LayoutEventArgs args) + 0x85 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.PerformLayout(System.Windows.Forms.Layout.IArrangedElement affectedElement, string affectedProperty) + 0x2e bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Layout.LayoutTransaction.DoLayout(System.Windows.Forms.Layout.IArrangedElement elementToLayout, System.Windows.Forms.Layout.IArrangedElement elementCausingLayout, string property) + 0x2e bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.OnResize(System.EventArgs e = {System.EventArgs}) + 0x47 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.UserControl.OnResize(System.EventArgs e) + 0xd bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.OnSizeChanged(System.EventArgs e = {System.EventArgs}) + 0x29 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.UpdateBounds(int x, int y, int width, int height, int clientWidth, int clientHeight) + 0x9c bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.UpdateBounds() + 0xd1 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.WmWindowPosChanged(ref System.Windows.Forms.Message m = {msg=0x47 (WM_WINDOWPOSCHANGED) hwnd=0x330fa8 wparam=0x0 lparam=0x435c94c result=0x0}) + 0x1d bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) + 0x24c bytes   
     System.Windows.Forms.dll!System.Windows.Forms.ScrollableControl.WndProc(ref System.Windows.Forms.Message m) + 0x2a bytes   
     System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.WndProc(ref System.Windows.Forms.Message m) + 0x10 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.UserControl.WndProc(ref System.Windows.Forms.Message m) + 0x10 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) + 0x10 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x31 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg = 71, System.IntPtr wparam, System.IntPtr lparam) + 0x57 bytes   
     [Native to Managed Transition]   
     [Managed to Native Transition]   
     System.Windows.Forms.dll!System.Windows.Forms.Control.SetBoundsCore(int x, int y, int width, int height, System.Windows.Forms.BoundsSpecified specified = None) + 0x162 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.SetBounds(System.Drawing.Rectangle bounds, System.Windows.Forms.BoundsSpecified specified) + 0x5e bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Layout.DefaultLayout.xLayoutDockedControl(System.Windows.Forms.Layout.IArrangedElement element, System.Drawing.Rectangle newElementBounds, bool measureOnly, ref System.Drawing.Size preferredSize, ref System.Drawing.Rectangle remainingBounds) + 0x34 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Layout.DefaultLayout.LayoutDockedControls(System.Windows.Forms.Layout.IArrangedElement container, bool measureOnly = false) + 0x138 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Layout.DefaultLayout.xLayout(System.Windows.Forms.Layout.IArrangedElement container = {Avaloq.Framework.ClientTier.SmartClient.Presentation.AvaloqControls.Containers.AvaloqWorkUseCase}, bool measureOnly = false, out System.Drawing.Size preferredSize = {Width = -7103 Height = -7105}) + 0x123 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Layout.DefaultLayout.LayoutCore(System.Windows.Forms.Layout.IArrangedElement container, System.Windows.Forms.LayoutEventArgs args) + 0x19 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Layout.LayoutEngine.Layout(object container, System.Windows.Forms.LayoutEventArgs layoutEventArgs) + 0x1b bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.OnLayout(System.Windows.Forms.LayoutEventArgs levent) + 0x83 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.ScrollableControl.OnLayout(System.Windows.Forms.LayoutEventArgs levent) + 0x43 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.OnLayout(System.Windows.Forms.LayoutEventArgs e) + 0x19 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.PerformLayout(System.Windows.Forms.LayoutEventArgs args) + 0x85 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.PerformLayout(System.Windows.Forms.Layout.IArrangedElement affectedElement, string affectedProperty) + 0x2e bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Layout.LayoutTransaction.DoLayout(System.Windows.Forms.Layout.IArrangedElement elementToLayout, System.Windows.Forms.Layout.IArrangedElement elementCausingLayout, string property) + 0x2e bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.OnResize(System.EventArgs e = {System.EventArgs}) + 0x47 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.UserControl.OnResize(System.EventArgs e) + 0xd bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.OnSizeChanged(System.EventArgs e = {System.EventArgs}) + 0x29 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.UpdateBounds(int x, int y, int width, int height, int clientWidth, int clientHeight) + 0x9c bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.UpdateBounds() + 0xd1 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.WmWindowPosChanged(ref System.Windows.Forms.Message m = {msg=0x47 (WM_WINDOWPOSCHANGED) hwnd=0x2a0ffc wparam=0x0 lparam=0x435d2f8 result=0x0}) + 0x1d bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) + 0x24c bytes   
     System.Windows.Forms.dll!System.Windows.Forms.ScrollableControl.WndProc(ref System.Windows.Forms.Message m) + 0x2a bytes   
     System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.WndProc(ref System.Windows.Forms.Message m) + 0x10 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.UserControl.WndProc(ref System.Windows.Forms.Message m) + 0x10 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) + 0x10 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x31 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg = 71, System.IntPtr wparam, System.IntPtr lparam) + 0x57 bytes   
     [Native to Managed Transition]   
     [Managed to Native Transition]   
     System.Windows.Forms.dll!System.Windows.Forms.Control.SetBoundsCore(int x, int y, int width, int height, System.Windows.Forms.BoundsSpecified specified = X | Y | Width | Height) + 0x162 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.SetBounds(int x, int y, int width, int height, System.Windows.Forms.BoundsSpecified specified) + 0x69 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.Bounds.set(System.Drawing.Rectangle value) + 0x16 bytes   
     Infragistics2.Win.UltraWinDock.v9.2.dll!Infragistics.Win.UltraWinDock.PaneControlAreaUIElement.PositionChildControl(System.Drawing.Rectangle workRect = {X = 0 Y = 0 Width = 1280 Height = 919}, Infragistics.Win.UltraWinDock.DockableControlPane pane = {DockableControlPane (UseCase:1) - UseCase:1}) + 0x182 bytes   
     Infragistics2.Win.UltraWinDock.v9.2.dll!Infragistics.Win.UltraWinDock.PaneControlAreaUIElement.PositionChildElements() + 0x277 bytes   
     Infragistics2.Win.v9.2.dll!Infragistics.Win.UIElement.VerifyChildElements(Infragistics.Win.ControlUIElementBase controlElement = {Infragistics.Win.UltraWinDock.DockableWindowUIElement}, bool recursive = true) + 0xdc bytes   
     Infragistics2.Win.v9.2.dll!Infragistics.Win.UIElement.VerifyChildElements(Infragistics.Win.ControlUIElementBase controlElement = {Infragistics.Win.UltraWinDock.DockableWindowUIElement}, bool recursive = true) + 0x12b bytes   
     Infragistics2.Win.v9.2.dll!Infragistics.Win.UIElement.VerifyChildElements(Infragistics.Win.ControlUIElementBase controlElement = {Infragistics.Win.UltraWinDock.DockableWindowUIElement}, bool recursive = true) + 0x12b bytes   
     Infragistics2.Win.UltraWinDock.v9.2.dll!Infragistics.Win.UltraWinDock.DockableWindowUIElement.VerifyChildElements(Infragistics.Win.ControlUIElementBase controlElement = {Infragistics.Win.UltraWinDock.DockableWindowUIElement}, bool recursive = true) + 0x32 bytes   
     Infragistics2.Win.v9.2.dll!Infragistics.Win.UIElement.VerifyChildElements(bool recursive = true) + 0x48 bytes   
     Infragistics2.Win.v9.2.dll!Infragistics.Win.ControlUIElementBase.VerifyIfElementsChanged(bool verify = true, bool syncMouseEntered = false) + 0x45 bytes   
     Infragistics2.Win.v9.2.dll!Infragistics.Win.ControlUIElementBase.CurrentCursor.get() + 0x42 bytes   
     Infragistics2.Win.v9.2.dll!Infragistics.Win.ManagedContainerControlBase.Cursor.get() + 0x49 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.Cursor.get() + 0x103 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.Cursor.get() + 0x103 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.Cursor.get() + 0x103 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.Cursor.get() + 0x103 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.Cursor.get() + 0x103 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.Cursor.get() + 0x103 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.Cursor.get() + 0x103 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.Cursor.get() + 0x103 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.Cursor.get() + 0x103 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.Cursor.get() + 0x103 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.Cursor.get() + 0x103 bytes   
     System.Windows.Forms.dll!System.Windows.Forms.Control.Cursor.get() + 0x103 bytes   

Parents
No Data
Reply
  • 44743
    posted

    The UltraDockManager lazily repositions and resizes docked controls to be in the rect of their pane. This happens when a repaint occurs or at some other time when UIElements are verified, such as when getting a Cursor, since this requires appearance resolution of the elements and therefore requires that they be updated with the current state of the control. If panes were resized or moved and you are asking for the Cursor before a repaint has occurred, this is correct. If not, it may be a bug and should be submitted to Developer Support.

Children
No Data