public static ResizeGripDirection GetResizeGripDirection(IInputElement inputElement)
{
Verify.IsNotNull(inputElement, "inputElement");
var dobj = inputElement as DependencyObject;
if (dobj == null)
{
throw new ArgumentException("The element must be a DependencyObject", "inputElement");
}
return (ResizeGripDirection)dobj.GetValue(ResizeGripDirectionProperty);
}