An adorner that can be used generically to add the element as the drag object in a drag-and-drop operation.
Public Member Functions |
|
void | Dispose () |
override GeneralTransform | GetDesiredTransform (GeneralTransform transform) |
Static Public Member Functions |
|
static DragAdorner | AttachDragAdorner (FrameworkElement element, double opacity, bool useDesiredSize) |
Used as the entry point to this adorner.
|
|
Protected Member Functions |
|
DragAdorner (UIElement owner) | |
DragAdorner (UIElement owner, FrameworkElement adornElement, bool useVisualBrush, bool useDesiredSize, double opacity) | |
override Visual | GetVisualChild (int index) |
override Size | MeasureOverride (Size finalSize) |
override Size | ArrangeOverride (Size finalSize) |
Properties |
|
bool |
UseTransform [get, set] |
override int |
VisualChildrenCount [get] |
WPFCustomControls::DragAdorner::DragAdorner | ( | UIElement | owner | ) | [inline, protected] |
WPFCustomControls::DragAdorner::DragAdorner | ( | UIElement | owner, |
FrameworkElement | adornElement, | ||
bool | useVisualBrush, | ||
bool | useDesiredSize, | ||
double | opacity | ||
) | [inline, protected] |
void WPFCustomControls::DragAdorner::Dispose | ( | ) | [inline] |
static DragAdorner WPFCustomControls::DragAdorner::AttachDragAdorner | ( | FrameworkElement | element, |
double | opacity, | ||
bool | useDesiredSize | ||
) | [inline, static] |
Used as the entry point to this adorner.
Call this method with an element that you want to see dragged across the surface of its owning window. Wrap the DragAdorner in a using clause that contains the DoDragDrop call, and the adorner shall be removed and disposed of as expected.
For this to work correctly, the window needs to be marked AllowDrop=true.
element | The element that should be dragged (doesn't need to be the triggering element.) Note that the element is used as the stencil for a VisualBrush, so nothing happens to the element itself. |
opacity | Opacity of dragging element. |
useDesiredSize | Whether to use the element's Desired size or Actual size. |
override Visual WPFCustomControls::DragAdorner::GetVisualChild | ( | int | index | ) | [inline, protected] |
override Size WPFCustomControls::DragAdorner::MeasureOverride | ( | Size | finalSize | ) | [inline, protected] |
override Size WPFCustomControls::DragAdorner::ArrangeOverride | ( | Size | finalSize | ) | [inline, protected] |
override GeneralTransform WPFCustomControls::DragAdorner::GetDesiredTransform | ( | GeneralTransform | transform | ) | [inline] |
bool
WPFCustomControls::DragAdorner::UseTransform [get,
set] |
override int
WPFCustomControls::DragAdorner::VisualChildrenCount [get,
protected] |