This is a migrated thread and some comments may be shown as answers.

Generate bitmap of source control for use as drag cue?

1 Answer 38 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Jon Barron
Top achievements
Rank 1
Jon Barron asked on 24 Sep 2010, 04:39 PM

When a user begins a drag operation, I'd like the drag cue to be a bitmap of the source control they are dragging. Is there a simple way to generate a bitmap from a given control and set it to be the drag cue?

1 Answer, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 24 Sep 2010, 05:36 PM
Hi Jon Barron,

You can create bitmap using WritableBitmap class. Please check the code needed.
Image elementAsImage = new Image();
WriteableBitmap bitmap = new WriteableBitmap(element, null);
elementAsImage.Source = bitmap;
 
e.Options.DragCue=elementAsImage;

Let know if you have any further questions.

Sincerely yours,
Tsvyatko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
DragAndDrop
Asked by
Jon Barron
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Share this question
or