Hi ,
I want to get the object of UltraToolbarsManager in a form by its name , but it is not a control , I can not get it by loop all the controls , how can i do?
Jason
Hello Jason,
Thank you for contacting Infragistics.
In order to reference the UltraToolbarsManager from code you need to already know the name it was given in the designer. Once you know that you can use code similar to the following:
VB: Me.UltraToolbarsManager1
C#: this.ultraToolbarsManager1;
Maybe I was not very clear expression. I means I have get a form object , I wanna loop all the control to get the ultratoolbarsmanager object ,but ultratoolbarsmanager is not a control , I can not the it .
Thank you for your response.
You can do what you want using reflection:
var fields = this.GetType().GetRuntimeFields();var tbManager = (from tmp in fields where tmp.FieldType == typeof(UltraToolbarsManager) select tmp).First().GetValue(this) as UltraToolbarsManager;
Thanks all, It works well as your suggustion!