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
1735
Drag the window by Ribbon Header area?
posted

Microsoft products allow the application to be dragged and moved around the screen by the Ribbon Header area, but that doesn't seem the case when using XamRibbonWindows.

Is there a way to enable this feature? Or it is not offered by the XamRibbonWindow at all?

Parents
No Data
Reply
  • 34810
    Verified Answer
    Offline posted

    Hello Dzyann,

    Thank you for your post.

    Currently, it does not appear that dragging a XamRibbonWindow by its header area is offered at the moment. However, there is a simple way to implement this. By handling the PreviewMouseDown event on the XamRibbon, you can check the OriginalSource property of the event arguments of that particular event. If you click on an empty part of the header area, this e.OriginalSource will return a XamPager named PART_TabItemScrollViewer. If you check if(e.OriginalSource is XamPager) and if that XamPager's Name property contains the word "PART," you can then call (where "this" is the XamRibbonWindow) this.DragMove(). This will move the window as long as the mouse button remains pressed.

    I have attached a sample project to demonstrate the above. I hope this helps you.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

    XamRibbonWindowDraggingCase.zip
Children