Hey guys,
Silverlight 4 has the ability to handle drag&drop. As most things in Silverlight and WPF, this happens through an event (DragEventArgs), which of course leads to code behind. To avoid this, you can use the EventToCommand trigger (a kind of Blend behaviors) that is part of the MVVM Light Toolkit. This component is available for WPF and SL (3 and 4) and allows to bind in XAML any event to an ICommand.
I explained here how to handle the drag/drop event directly in the VM, without code behind, but of course this component can be used for other events as well.
http://blog.galasoft.ch/archive/2009/12/17/silverlight-4-dragampdrop-with-eventtocommand.aspx
As usual, feedback is welcomed.
Cheers,
Laurent
--
Laurent Bugnion [Microsoft MVP, MCP]
Blog: http://blog.galasoft.ch
Support children in Calcutta: http://www.calcutta-espoir.ch
|
|
as |