How can I drag and drop a xaml activity to a WF4 rehosted designer?
Posted
by
Louis Rhys
on Stack Overflow
See other posts from Stack Overflow
or by Louis Rhys
Published on 2010-12-30T03:16:44Z
Indexed on
2011/01/03
7:54 UTC
Read the original article
Hit count: 500
I understand that the WorkflowDesigner
can receive a dragged item in several ways, for example:
- By dragging an item from the toolbox and dropping it on the designer: an empty activity of that type will be inserted on the designer at the drop location.
- One can also drag an activity from the designer and drop it on another location in the designer, the dragged activity will be inserted at the drop location as well.
Is it possible that similar to these two drag and drop mechanism, I can drag a xaml activity to the designer? What I have in mind is this,
Let's say you have a ListView
containing several xaml files. I want to be able to drag one of the ListView
items (ie one of the xaml files), and when I drag it over the designer it will act as if I drag something from the toolbox (except the activity will be supplied from the xaml). I know I can create a runtime Activity
from the file by using ActivityXamlServices.Load(filename)
, and I want this activity to be inserted at the drop location. But how to tell the application to understand this when I drag and drop?
© Stack Overflow or respective owner