public object GetDragDropObject(object sender, System.Windows.Input.MouseEventArgs e) { if (_element != null) { var value = AttachedProperties.GetDragObject(_element); var accessor = value as Func <object>; if (accessor != null) { return(accessor()); } return(value); } return(null); }