Embedded Workitems with same Commands Name

Topics: CAB & Smart Client Software Factory
Jan 21, 2006 at 12:53 AM
originally posted by: marconet

Hi Everybody,

I've seen that as soon as I create a new embedded workitem, with something like :
Dim newWK As MyWorkItem = Me.WorkItems("MyEmbeddedItem")
If newWK Is Nothing Then newWK = Me.WorkItems.AddNew(GetType(MyWorkItem), "MyEmbeddedItem")
newWK Commands collection includes all the parent workitem's commands
and relative adapters pointing to the existing ToolStripItems.

At this moment I need to have commands in the 'newWK' with the same name as the parents'
(because both inherits from the same custom base class)
but with different behaviour and different adapters.

I can't understand :

1. Why this behaviour is by design (if it is)
2. How can solve this problem

I'm wrong ?
Can anyone help or give any suggestion ?

Thanks in advance