Microsoft.Phone.Controls.ListPicker.IsValidManipulation C# (CSharp) Method

IsValidManipulation() private method

private IsValidManipulation ( object OriginalSource, Point p ) : bool
OriginalSource object
p Point
return bool
        private bool IsValidManipulation(object OriginalSource, Point p)
        {
            DependencyObject element = OriginalSource as DependencyObject;

            while (null != element)
            {
                if (_itemsPresenterHostPart == element || _multipleSelectionModeSummary == element || _border == element)
                {
                    double Padding = 11.0;
                    return (p.X > 0 && p.Y > 0 - Padding && p.X < _border.RenderSize.Width && p.Y < _border.RenderSize.Height + Padding);
                }

                element = VisualTreeHelper.GetParent(element);
            }
            return false;
        }