Thank you for the hint, since I am using the whole draganddrop
infrastructure, this would
lead to a difficile design. At this time, I am using a workaround via
reflection:
Type t = de.Data.GetType();
if (t.Name == "BehaviorDataObject")
{
PropertyInfo pi = t.GetProperty("DragComponents");
ArrayList comps = pi.GetValue(de.Data, null) as ArrayList;
if (comps != null && comps.Count > 0)
{
object o = comps[0]; //
here I get my dragged OutputControl
if (o.GetType() == typeof(OutputControl)) { // lets see if
is really an OutputControl
This returns the DragComponents property from DropSourceBehavior which in
turn holds
the dragged control in its ArrayList.
However, I would like Microsoft to notice that there is a problem with
keeping DropSourceBehavior internal.
Or maybe I missed something. Also to MS: VS 2005 is superdupergreat! i love
it!
thanks jokiz
> i'm not familiar with 2.0 but perhaps you can hook up with
> componentadding event of IComponentChangeService just like 1.1