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
3788
How to get end drag position of toolbar
posted

Hi,

  Can you tell me, How to get the EndDrag position of toolbar in

ToolBarModified event?

Or

Is there another way to get EndDrag position of ToolBar, when user started to drag toolbar?

Parents
No Data
Reply
  • 5389
    Suggested Answer
    posted

    amit_mundra_83,

    Try handling the ToolbarModified event and use code like:

            private void ultraToolbarsManager1_ToolbarModified(object sender, ToolbarModifiedEventArgs e)
            {
                if (e.ToolbarChangeType == ToolbarChangeType.EndDrag)
                {
                    Point p;
                    if (e.Toolbar.DockedPosition != DockedPosition.Floating)
                        p = new Point(e.Toolbar.UIElement.Rect.X, e.Toolbar.UIElement.Rect.Y);
                    else
                        p = e.Toolbar.FloatingLocation;
                }
            }

    This should give you the location of the top left corner of the UltraToolbar, whether it is docked or floating.

    Hope this helps,

    ~Kim~

Children