0

I've found this code which allows dragging a control around a canvas.

What is the way to add this draggable property programmatically to a control that's created in C#?

General Grievance
  • 4,555
  • 31
  • 31
  • 45
David
  • 171
  • 2
  • 10

1 Answers1

1

You can set it like this, for example:

Button b = new Button();

b.SetValue(DraggableExtender.CanDragProperty, true);
Chris Mack
  • 5,148
  • 2
  • 12
  • 29