Hello,
I need to set the ribbon length to ribbon group created for that particular ribbon tab.
Please suggest me how to set the ribbon length during run time or even during design. Please provide all the options available to set the ribbon length.
Hello Petar,
I had gone through the documentation link sent. Finally i wrote the coding successfully. Let me provide the code which may be useful for our members.
ultraToolbarsManager1.CreationFilter = new class1();
public partial class class1 : IUIElementCreationFilter { #region IUIElementCreationFilter Members public void AfterCreateChildElements(UIElement parent) { RibbonTabPageUIElement ribbArea10 = parent as RibbonTabPageUIElement;
if (ribbArea10 != null) { Rectangle newRect = new Rectangle(ribbArea10.Rect.X, ribbArea10.Rect.Y, 400, ribbArea10.Rect.Height); ribbArea10.Rect = newRect; } } public bool BeforeCreateChildElements(UIElement parent) { return false; } #endregion
}
The code above provided is for the reduction of the RibbonTab alone.
It can also be done for quickaccesstoobbar, tabitemtoolbar CaptionArea, CaptionButton by using the appropiate Uielement class at Italized point.
Once again Thankyou Petar for the Guidance Provided.
Thank You for the Reply.
I will go through the online Documentation and come back.
Once again Thank you for the Guidance Provided.
HI,
Here is link from our Online Documentaion which describes what the Creation Filter is and how its event work: http://help.infragistics.com/Help/NetAdvantage/WinForms/2009.2/CLR2.0/html/Win_Presentation_Layer_Framework_PLF.html
and this in particular: http://help.infragistics.com/Help/NetAdvantage/WinForms/2009.2/CLR2.0/html/Win_Creation_Filter.html
Since you are new to Infragistics, I suggest reading through the docuemntation or at least its root pages...
Hop this is helpful.
Regards Petar.
What does the word parent refers to in the coding you had provide.
I am not using any child form.
I am creating a ultraToolbarsManager at run time with Ribbon tabs, ribbon groups and its associated tool bars.
your coding gives me good understanding but i couldn't understand the term 'Parent'.
This may be silly matter to you Sir,But I am new to Infragistics .
Please Clarify.
Usually the Ribbon isn't designed to be resizable, but you can always try the CreationFilter. You can do something like this in the AfterCreateChildElements event:
RibbonAreaUIElement ribbArea = parent as RibbonAreaUIElement;
if (ribbArea != null)
{
Rectangle newRect = new Rectangle(ribbArea.Rect.X, ribbArea.Rect.Y, 200, ribbArea.Rect.Height);
ribbArea.Rect = newRect;
which will set its width to 200.
Hope this helps.
Sincerely,
Petar Monov,
DS Engineer,
Infragistics Bulgaria