protected RectangleF GetProgressIndicatorFinalSize(ProgressIndicatorElement element, RectangleF clientRect, int value) { if (value == Minimum) { element.Visibility = ElementVisibility.Collapsed; return(RectangleF.Empty); } element.Visibility = ElementVisibility.Visible; if (value == Maximum) { return(clientRect); } int step = this.separatorsElement.SeparatorWidth + this.separatorsElement.StepWidth; if (this.ProgressOrientation == ProgressOrientation.Left || this.ProgressOrientation == ProgressOrientation.Right) { return(GetHorizontalProgressIndicatorFinalSize(clientRect, value, step)); } else { return(GetVerticalProgressIndicatorFinalSize(clientRect, value, step)); } }
protected override void CallCreateChildElements() { base.CallCreateChildElements(); this.indicatorElement1 = new UpperProgressIndicatorElement(); this.indicatorElement2 = new ProgressIndicatorElement(); this.separatorsElement = new SeparatorsElement(); this.textElement = new ProgressBarTextElement(); this.textElement.StretchHorizontally = true; this.textElement.StretchVertically = true; this.Children.Add(indicatorElement2); this.Children.Add(indicatorElement1); this.Children.Add(separatorsElement); this.Children.Add(textElement); }
protected override void CallCreateChildElements() { base.CallCreateChildElements(); this.indicatorElement1 = new UpperProgressIndicatorElement(); int num1 = (int)this.indicatorElement1.BindProperty(RadElement.ShapeProperty, (RadObject)this, RadElement.ShapeProperty, PropertyBindingOptions.OneWay); this.indicatorElement2 = new ProgressIndicatorElement(); int num2 = (int)this.indicatorElement2.BindProperty(RadElement.ShapeProperty, (RadObject)this, RadElement.ShapeProperty, PropertyBindingOptions.OneWay); this.separatorsElement = new SeparatorsElement(); int num3 = (int)this.separatorsElement.BindProperty(RadElement.ShapeProperty, (RadObject)this, RadElement.ShapeProperty, PropertyBindingOptions.OneWay); this.textElement = new ProgressBarTextElement(); this.textElement.StretchHorizontally = true; this.textElement.StretchVertically = true; int num4 = (int)this.textElement.BindProperty(LightVisualElement.TextAlignmentProperty, (RadObject)this, LightVisualElement.TextAlignmentProperty, PropertyBindingOptions.OneWay); this.Children.Add((RadElement)this.indicatorElement2); this.Children.Add((RadElement)this.indicatorElement1); this.Children.Add((RadElement)this.separatorsElement); this.Children.Add((RadElement)this.textElement); }