예제 #1
0
        protected override SizeF ArrangeOverride(SizeF finalSize)
        {
            SizeF final = base.ArrangeOverride(finalSize);

            if (this.Children.Count < 2)
            {
                return(final);
            }

            BorderPrimitive borderPrimitive = this.Children[1] as BorderPrimitive;

            if (borderPrimitive == null)
            {
                return(final);
            }


            int divider = 1;

            if (Minimum != 0)
            {
                divider = Maximum - Minimum;
            }

            float fillWidth  = (finalSize.Width * Value1) / divider;
            float fillHeight = (finalSize.Height * Value1) / divider;

            if (Orientation == ProgressOrientation.Left)
            {
                borderPrimitive.Arrange(new RectangleF(1, 0, fillWidth + 1, final.Height - 1));
            }

            return(final);
        }
예제 #2
0
        protected override SizeF ArrangeOverride(SizeF finalSize)
        {
            SizeF sizeF = base.ArrangeOverride(finalSize);

            if (this.Children.Count < 2)
            {
                return(sizeF);
            }
            BorderPrimitive child = this.Children[1] as BorderPrimitive;

            if (child == null)
            {
                return(sizeF);
            }
            int num1 = 1;

            if (this.Minimum != 0)
            {
                num1 = this.Maximum - this.Minimum;
            }
            float  num2 = finalSize.Width * (float)this.Value1 / (float)num1;
            double num3 = (double)finalSize.Height * (double)this.Value1 / (double)num1;

            if (this.Orientation == ProgressOrientation.Left)
            {
                child.Arrange(new RectangleF(1f, 0.0f, num2 + 1f, sizeF.Height - 1f));
            }
            return(sizeF);
        }