private int GetDropHintWidth(RadListElement listElement)
 {
     int num = listElement.ControlBoundingRectangle.Width - LightVisualElement.GetBorderThickness((LightVisualElement) listElement, true).Horizontal;
       if (listElement.VScrollBar.Visibility == ElementVisibility.Visible)
     num -= listElement.VScrollBar.Size.Width;
       return num;
 }
Example #2
0
 public virtual void Update()
 {
   this.sizeMode = (PageViewItemSizeMode) this.itemLayout.GetValue(RadPageViewElement.ItemSizeModeProperty);
   this.contentOrientation = (PageViewContentOrientation) this.itemLayout.GetValue(RadPageViewElement.ItemContentOrientationProperty);
   this.itemSpacing = (int) this.itemLayout.GetValue(RadPageViewElement.ItemSpacingProperty);
   this.vertical = this.GetIsVertical();
   this.availableLength = this.vertical ? this.availableSize.Height : this.availableSize.Width;
   this.paddingLength = this.vertical ? (float) this.itemLayout.Padding.Vertical : (float) this.itemLayout.Padding.Horizontal;
   Padding borderThickness = LightVisualElement.GetBorderThickness(this.itemLayout, true);
   this.borderLength = this.vertical ? (float) borderThickness.Vertical : (float) borderThickness.Horizontal;
   int num = 0;
   foreach (RadElement child in this.itemLayout.Children)
   {
     RadPageViewItem radPageViewItem = child as RadPageViewItem;
     if (radPageViewItem != null && radPageViewItem.Visibility != ElementVisibility.Collapsed)
     {
       radPageViewItem.Measure(this.GetMeasureSizeConstraint((RadItem) radPageViewItem));
       PageViewItemSizeInfo itemSizeInfo = this.CreateItemSizeInfo(radPageViewItem);
       itemSizeInfo.desiredSize = new SizeF(radPageViewItem.DesiredSize.Width, radPageViewItem.DesiredSize.Height);
       this.maxWidth = Math.Max(itemSizeInfo.desiredSize.Width, this.maxWidth);
       this.maxHeight = Math.Max(itemSizeInfo.desiredSize.Height, this.maxHeight);
       this.items.Add(itemSizeInfo);
       itemSizeInfo.itemIndex = num++;
     }
   }
   this.itemCount = this.items.Count;
 }
Example #3
0
        protected override void OnNCPaint(Graphics g)
        {
            Padding borderThickness = LightVisualElement.GetBorderThickness((LightVisualElement)this.DataLayoutElement, true);

            if (!(borderThickness != Padding.Empty))
            {
                return;
            }
            this.DataLayoutElement.BorderPrimitiveImpl.PaintBorder((IGraphics) new RadGdiGraphics(g), 0.0f, new SizeF(1f, 1f), new RectangleF(PointF.Empty, new SizeF((float)(this.Width - borderThickness.Right), (float)(this.Height - borderThickness.Bottom))));
        }
        private int GetDropHintWidth(RadTreeViewElement treeView)
        {
            int num = treeView.ControlBoundingRectangle.Width - LightVisualElement.GetBorderThickness((LightVisualElement)treeView, true).Horizontal;

            if (treeView.VScrollBar.Visibility == ElementVisibility.Visible)
            {
                num -= treeView.VScrollBar.Size.Width;
            }
            return(num);
        }
Example #5
0
 protected override Padding GetNCMetrics()
 {
     return(LightVisualElement.GetBorderThickness((LightVisualElement)this.DataLayoutElement, true));
 }