Can I quickly replace my components to a custom theme's components?

前端 未结 2 1057
无人及你
无人及你 2021-01-25 22:44

I want to improve the look of my program by using a custom created theme like this: http://www.mpgh.net/forum/33-visual-basic-programming/492570-biesis-vb-net-theme-archive.html

相关标签:
2条回答
  • 2021-01-25 22:51

    There is a way, though not recommended (depending on the complexity of your application). Make sure you've got a full backup of your project before trying this.

    1. With your project still open, close all open files and hit Ctrl + H.
    2. In Find what enter the fully qualified name of the control to replace.
    3. In Replace with enter the fully qualified name of the custom control.
    4. Set Look in to Current Project.
    5. Check Match case and Match whole word.
    6. Click Replace All button.

    Find and Replace

    0 讨论(0)
  • 2021-01-25 22:52

    This really depends on what your custom controls are. Based on previous experience with Devexpress, for example, replacing control class names, as suggested by @Bjorn, will only work for some of their controls. Others will not behave expected, because they rely on sub-controls, generated automatically by the designer, whenever a control is placed on the form.

    The best approach as I see it now, would be to redesign your form with placeholder controls (no specific binding to any UI framework), then replace, or embed the actual controls at runtime. You should be most flexible this way, and even able to inject sub-controls (to solve the problem with some Devexpress controls).

    0 讨论(0)
提交回复
热议问题