internal virtual bool IsCheckModeArea(RadDataBoundListBoxItem item, UIElement container, Point hitPoint)
        {
            if (!ElementTreeHelper.IsElementRendered(item) || !ElementTreeHelper.IsElementRendered(container as FrameworkElement))
            {
                return(false);
            }

            Point relativeOffset = container.TransformToVisual(item).TransformPoint(new Point(0, 0));

            hitPoint = new Point(relativeOffset.X + hitPoint.X, relativeOffset.Y + hitPoint.Y);
            return(item.IsPointInCheckModeAreaForItem(hitPoint));
        }
示例#2
0
        internal virtual bool ShouldToggleExpandOnTap(Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
        {
            if (ElementTreeHelper.IsElementRendered(this.expanderHeaderLayoutRoot))
            {
                Point position = e.GetPosition(this.expanderHeaderLayoutRoot);

                var rect = new Rect(new Point(), this.expanderHeaderLayoutRoot.RenderSize);

                return(rect.Contains(position));
            }

            return(false);
        }
示例#3
0
        private double GetOffsetRelativeToTargetItem()
        {
            if (!ElementTreeHelper.IsElementRendered(this) || !ElementTreeHelper.IsElementRendered(this.targetItem))
            {
                return(0);
            }

            Point offset = this.TransformToVisual(this.targetItem).TransformPoint(new Point(0, 0));

            if (this.owner.virtualizationStrategy.LayoutOrientation == Orientation.Vertical)
            {
                return(offset.Y + ((this.DesiredSize.Height - this.targetItem.height) / 2));
            }
            else
            {
                return(offset.X + ((this.DesiredSize.Width - this.targetItem.width) / 2));
            }
        }