We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to inherit a BarManager

I tried to inherit the MainFrameBarManager to add my own logic to it. If I now try to add my of MainFrameBarManager to a form, it will automatically be removed from the forms components. Why is this happening? I would like to add my own resource handling directly into the MainFrameBarManager and into the ChildFrameBarManager to have access on all the existing commands to correctly being able to customize them for different languages.

4 Replies

AD Administrator Syncfusion Team May 14, 2002 12:48 PM UTC

I created a derived manager with these constructors: public class MyManager : MainFrameBarManager { public MyManager(IContainer components, Form form) : base(components, form) { } public MyManager(Form form) : base(form) { } public MyManager() { } } ...and it seemed to behave as expected during design-time. If you still have the problem you mention, please send a sample app that reproduces this issue to our Support Center, if you can. Just curious... how come you are not using the default localization support provided by VS.Net by turning on "localization" for your Forms and simply distributing add-on satellite resource dlls for specific locales? That way customization based on locale will be automatically handled by .Net (the menu command text as well). -Praveen Ramesh > I tried to inherit the MainFrameBarManager to add my own logic to it. > > If I now try to add my of MainFrameBarManager to a form, it will automatically be removed from the forms components. Why is this happening? > > I would like to add my own resource handling directly into the MainFrameBarManager and into the ChildFrameBarManager to have access on all the existing commands to correctly being able to customize them for different languages. >


AB Alex Brunner May 15, 2002 04:16 AM UTC

I will try to do that kind of inheritance. The reason why we are not using the default localization of VS.net is the following. If you do that you will get resx files for every form you are using. If you now would like to handle the translation of these files you will end up in a big problem. You must translate the resources by yourself because you will need the IDE to do so. If you are trying to outsource this task then you will have to send all your resx-files to the translation office which again needs the IDE to do the translation. Our approach is to implement an interface for the resource handling on every control. All our forms will be built in a way that should enable us to go ahead with translation without changing the forms layout. All our resource texts are located in special databases which can be used to do the translation process easily. When finished with the translation we only generate satellite assemblys wich are read by our resource handling mechanisms. We are also able to switch every resource handled control from satellite assembly to db based resource handling. Our way of doing localization enables us to use the same techniques in WinForms and WebForms and gives us the possibility of supporting ContentManagementSystems as well. Do you think we are wrong with this approach? kind regards, Alex


AD Administrator Syncfusion Team May 15, 2002 03:32 PM UTC

The Winres.exe tool that comes with .Net lets you localize neutral culture .resx files to other locales and helps create satellite resource assemblies without the use of VS.Net IDE. One advantage I see in using this tool (and the IDE) is that you can localize much more than the text. I like the idea of being able to adjust the size of the Controls in particular. I am not familiar with localization in WebForms, so there are probably more issues to consider when you design your localization scheme. -Praveen Ramesh


AB Alex Brunner May 16, 2002 02:07 AM UTC

Do you know a way to handle all resources in only one resx-file? As much as I know, Winres only lets you customize one resx-file of one specific form. So if you have 200 forms in an application, you will get 200 resx files to translate - not really an easy job. WebForms have not localization support at all (by MS-default). You have to build it by yourself.

Loader.
Live Chat Icon For mobile
Up arrow icon