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
180
ultraToolbarsManager Tool object with constant defined key
posted

While designing/customizing ultraToolbarsManager on UserControl, I've add new tool (using New Tool dialog) and specified caption and key string values. Now I want to have these literal string values (inside the designer file) to be replaced by the constants strings defined outside the Designer.cs. After I did that, the VS designer replaces them with the literaly values used to initialize these constants. The only way I was able to make it work was by replacing these caption and key string values (inside the designer file) with the resource file provided values, using syntax like global::***.Properties.Resources.***. The VS designer does not seems to have any problems leaving in places these definition and respects them correctly.

Is this the only way (inside the Designer.cs and not programatically outside of it) to provide non-literaly defined string values as keys for ultraToolbarsManager defined tools ? I'm trying to avoid using the resource definitions for this purpose, which could be potentialy modified during the internationalization process.

  • 44743
    posted

    Yes. If you would like to provide constants, you will have to manually add the tools and toolbars in the constructor. The designer file is managed by VS and should not be manually modified anyway because there is a good chance your code will be overwritten anyway the next time the designer is opened.