protected SizeF ApplyClientOffset(SizeF measured)
        {
            Padding padding1 = this.Padding;
            Padding padding2 = TelerikDpiHelper.ScalePadding(this.GetBorderThickness(true), this.DpiScaleFactor);

            measured.Width  += (float)(padding1.Horizontal + padding2.Horizontal);
            measured.Height += (float)(padding1.Vertical + padding2.Vertical);
            return(measured);
        }
Esempio n. 2
0
        private void SynchronizeWithParentBorderThickness()
        {
            RadElement parent = this.Parent;

            if (parent is BorderPrimitive || parent == null)
            {
                return;
            }
            if (this.Visibility == ElementVisibility.Collapsed)
            {
                parent.BorderThickness = new Padding(0);
            }
            else
            {
                parent.BorderThickness = TelerikDpiHelper.ScalePadding(this.GetBorderThickness(), new SizeF(1f / this.DpiScaleFactor.Width, 1f / this.DpiScaleFactor.Height));
            }
        }