Our Business Application is made out of many listviews to display data.
We already extended the "basic" listview to an "extendedListView" in order to add different functionality, like sorting, Column reordering and stuff.
Now, we also want to add stuff like "Options" and "Aggregations" to every listview.
So, we decided to create a "Wrapper" (In java known as Composite Component) that is made of the listview and several buttons, depending on what is enabled for the ListviewWrapper, i.e. Excel-Export, CSV Export, Aggregations and many more:
The "Wrapper" exposes the underlaying Listview, top and bottom-panel as a property:
public partial class ExtendedListViewWrapper : UserControl
{
public Panel TopPanel { get { return this.topPanel; } }
public Panel BottomPanel { get { return this.bottomPanel; } }
public ExtendedListView ExtendedListView { get { return this.extendedListView; } }
This works nice, and allows us to modify every Property of the included listview during design time, if the wrapper is added to some form:
However, The Designer only allows to modify the EVENTS of the Wrapper itself. I can't set the Double-Click-Event for the included listview in the same way.
I.e. I would Expect - as for properties - to have the following option in the designer:
...
DoubleClick
DragDrop
...
[+] ExtendedListView
...
DoubleClick
DragDrop
...
Do we need to manually write code, that takes care to call the included event handler, or is there just something we missed?
What would be the best practice to modify the event handlers of components included inside user components, if the handler should be dynamicly defined per "Outer component" within the designer?