I can't get this to work with WebBrowser or Button controls. Are there properties that need to be set on the controls to get them to work (I tried Background on the Button, it didn't help, WebBrowser doesn't have a Background property).
Hello,
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
I have been looking into the behavior that you are getting and it seems that when you click in the WebBrowser you are actually clicking on the HTML components that are displayed in the WebBrowser. That should be the reason for the drag events to not get fired when you try dragging the WebBrowser itself. I can suggest using the approach that you have mentioned, wrapping the WebBrowser control in a Border, setting the Border to be the DragSource and leaving a drag area, using margin or padding.
If you have any further questions please do not hesitate to ask.
Actually, I was trying to use them (Button and WebBrowser) as Drag sources. The info on making them Drop sources is useful as well.
I tried wrapping the WebBrowser in a border to make it a drag source, but it didn't work. If I add padding so I can grab just the border it works as a Drag source, but if I click over the WebBrowser and try to drag, nothing happens (Drag events don't get triggered).
It seems that you try to use the WebBrowser as a drop target but it doesn’t support the mouse events. You can wrap it with a border and use it as a drop target instead. So here the rectangle is a drag source whereas both the button and the border are drop targets
<Rectangle Width="100" Height="60" Fill="Beige">
<ig:DragDropManager.DragSource>
<ig:DragSource IsDraggable="True"/>
</ig:DragDropManager.DragSource>
</Rectangle>
<Button Grid.Column="1" Width="150" Height="200" Content="Drop Here">
<ig:DragDropManager.DropTarget>
<ig:DropTarget IsDropTarget="True"/>
</ig:DragDropManager.DropTarget>
</Button>
<Border Background="Transparent" Grid.Column="2">
<WebBrowser x:Name="webBrowser" Source="http://msdn.com"/>
</Border>
Is that your scenario?
Best regards.
Plamen.