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
200
Right-aligning ToolBar
posted

Hello,

I would like to know how to align an entire toolbar on the right side. I know how to align Tools in the toolbar on the righ side with the label tool spring property set to true but I can't find the setting to align an entire toolbar to the right. Thanks for your help in advance.

Parents
  • 44743
    Verified Answer
    posted

    There is no property to align the toolbar like this. You can submit a feature request for this here: http://devcenter.infragistics.com/Protected/RequestFeature.aspx.

    You can also try to use a creation filter to manually align the toolbar. If you have never used creation filters before, the following article gives a brief overview: http://help.infragistics.com/Help/NetAdvantage/NET/2008.1/CLR2.0/html/Win_Creation_Filter.html. Your BeforeCreateChildElements would just return False. In your AfterCreateChildElements implementation, if the parent element passed in is of type UltraToolbarsDockAreaUIElement, iterate it's ChildElements collection until you find an element with the type ToolbarUIElement whose Toolbar property is the toolbar you want to right align. Change its Rect like this:

    Rectangle rect = toolbarElement.Rect;

    rect.X = dockAreaElement.RectInsideBorders.Right - rect.Width;

    toolbarElement.Rect = rect;

Reply Children