Skip to Content
0
Former Member
Jun 29, 2009 at 09:29 AM

How to reuse UI elements in view design

47 Views

Hello

How can I reuse UI elements when designing a view?

For example: I built a UI container (TransparentContainer) consisting of a FormattedTextEdit, some buttons and other UI Elements. This container will be used in several views and even several times inside the same view.

The solution which I use at the moment is to copy/paste this UI container. But this is a bad solution, because if something in the container has to be changed, it is very cumbersome to adapt also all copied instances.

I also tried to put my UI container into a separate view and than to reuse this view in other views by means of the ViewContainerUIElement. But this does not work if the UI container has to be placed more than once inside a view, as duplicate usage of a view raises a WDRuntimeException.

What is the best way do reuse several UI Elements in desinging a view?

Greetings

Rolf