Hello,
I have a problem to translate the resources of my Forms which are set to Localizable to true.
I have noticed that the ultraTabPageControl has not any Text property.
Into the resrouces file I can see items for TabPageControl objects, but their IDS came from the objects' name automatically generated from design.
So, the problem is, if we remove a tabPage and create a new one, the tabPage name does not re-use the last free tabnumber; I mean the name is always incrementing, even if one tabPage has been deleted.
Because of that, that piece of code added to bypass the fact the the TabPageControl has no Text property can not fully solve the problem:
control.Text = (string)GetSafeValue(resources, control.Name + ".Text", control.Text);if (control is Infragistics.Win.UltraWinTabControl.UltraTabPageControl){ Infragistics.Win.UltraWinTabControl.UltraTabPageControl tabPageControl = (Infragistics.Win.UltraWinTabControl.UltraTabPageControl) control; if (tabPageControl.Tab != null) { control.Text = (String) GetSafeValue(resources, tabPageControl.Tab.Key + ".Text", tabPageControl.Tab.Text); }}
I think also that the reason of the problem is because the tabPageControl has no "Name" property, like it is for standrad windows TabPage control.
We are experiencing same problem with statusbar control, and ultraTree.
To let you understand my problem more easily, here are a sample project.
Please run project "TestSDIApp" to test.
Under folder "FormLanguangeML" you can find a file "FormLanguangeML.loc" which is a file created by Lingobit application (availabe in demo version), used to manage resources for different languages.
Into "\Sample\TestSDIApp\FormMain.resx" you can see that the Infragistics tab controls are detected into resources as "ultraTab1.Text" and "ultraTab2.Text".
Into "\Sample\FormLanguageSwitch\FormLanguageSwitch.cs" you see the method:
protected virtual void ReloadTextForSelectedControls(System.Windows.Forms.Control control, System.Resources.ResourceManager resources)
which i had to modify to force the applying of resources for Infragistics tab controls.
After that, you can remove one infragistics tab page, recreate a new tab page, and notice that the new tab page is "ultraTab3" and because tab page object has not "Name" property and also because the "Accessibility" property doesn't allow to retrieve the object name value, i must add manually a "key" value the to tab page control.
--> this way of work is not good neither safe into a big project (when some developers are working on it).
I understand your problem. We had the same issue with Appearance objects, tool objects in the UltraToolbarsManager, and groups in the UltraExplorerBar. This seems to be an issue with the way VS localizes resources and creates local variable names. We have worked around it for the classes I mentioned and can also work around it for the other classes as well, but we are only fixing the issue on each object it is reported on as it is potentially destabilizing and we don't want to introduce too many destabilizing changes at once. I have forwarded this post to the Developer Support Manager and a DS engineer will be contacting you about this issue.