Ejemplo n.º 1
0
 protected override void OnUnloaded(ComponentThemableElementTree oldTree)
 {
     base.OnUnloaded(oldTree);
     this.itemToEnsureVisible = (RadPageViewItem)null;
     this.layoutInfo          = (StripViewLayoutInfo)null;
     this.scrollAnimation.Stop((RadObject)this);
 }
Ejemplo n.º 2
0
        protected override void OnUnloaded(ComponentThemableElementTree oldTree)
        {
            base.OnUnloaded(oldTree);

            this.itemToEnsureVisible = null;
            this.layoutInfo          = null;
            this.scrollAnimation.Stop(this);
        }
Ejemplo n.º 3
0
        protected override SizeF MeasureOverride(SizeF availableSize)
        {
            float prevItemLength = -1;

            if (this.layoutInfo != null)
            {
                prevItemLength = this.layoutInfo.layoutLength;
            }

            this.layoutInfo = null;
            if (availableSize.Width <= 0 || availableSize.Height <= 0)
            {
                this.ResetScrollOffset();
                return(SizeF.Empty);
            }

            this.layoutInfo = new StripViewLayoutInfo(this, availableSize);
            if (this.layoutInfo.itemCount == 0)
            {
                this.ResetScrollOffset();
                return(SizeF.Empty);
            }

            this.ApplyItemSizeMode();
            this.ApplyItemFitMode();

            if (this.layoutInfo == null)
            {
                return(SizeF.Empty);
            }

            this.MeasureItems();

            this.UpdateScrollOffset(prevItemLength, availableSize);

            SizeF measured = this.layoutInfo.measuredSize;

            //apply padding and border
            measured = this.ApplyClientOffset(measured);
            //consider min/max size
            return(this.ApplyMinMaxSize(measured));
        }
Ejemplo n.º 4
0
        protected override SizeF MeasureOverride(SizeF availableSize)
        {
            float prevItemLength = -1f;

            if (this.layoutInfo != null)
            {
                prevItemLength = this.layoutInfo.layoutLength;
            }
            this.layoutInfo = (StripViewLayoutInfo)null;
            if ((double)availableSize.Width <= 0.0 || (double)availableSize.Height <= 0.0)
            {
                this.ResetScrollOffset();
                return(SizeF.Empty);
            }
            this.layoutInfo = new StripViewLayoutInfo((LightVisualElement)this, availableSize);
            if (this.layoutInfo.itemCount == 0)
            {
                this.ResetScrollOffset();
                return(SizeF.Empty);
            }
            this.ApplyItemSizeMode();
            this.ApplyItemFitMode();
            if (this.layoutInfo == null)
            {
                return(SizeF.Empty);
            }
            if (this.layoutInfo.fitMode == StripViewItemFitMode.MultiLine)
            {
                this.MeasureItemsInMultiLine(availableSize);
            }
            else
            {
                this.MeasureItems();
            }
            this.UpdateScrollOffset(prevItemLength, availableSize);
            return(this.ApplyMinMaxSize(this.ApplyClientOffset(this.layoutInfo.measuredSize)));
        }
Ejemplo n.º 5
0
 public StripViewItemShrinkStrategy(StripViewLayoutInfo sizeInfo)
 {
     this.layoutInfo = sizeInfo;
     this.shrinkInfo = new StripViewItemShrinkStrategy.StripViewShrinkInfo();
 }
 public StripViewItemExpandStrategy(StripViewLayoutInfo info)
 {
     this.layoutInfo = info;
     this.expandInfo = new ExpandInfo();
 }