private void RangeSelectorViewContainer_RefreshNeeded(object sender, EventArgs e) { this.RangeSelectorElement.SuspendPropertyNotifications(); IRangeSelectorElement associatedElement = this.RangeSelectorElement.AssociatedElement as IRangeSelectorElement; this.RangeSelectorElement.EndRange = associatedElement.RangeSelectorViewEnd; this.RangeSelectorElement.StartRange = associatedElement.RangeSelectorViewStart; this.RangeSelectorElement.ResumePropertyNotifications(); }
public virtual void InitializeElements() { IRangeSelectorElement associatedElement = this.BodyElement.ViewContainer.AssociatedElement as IRangeSelectorElement; this.TopLeftScales.Clear(); this.BottomRightScales.Clear(); if (associatedElement != null) { this.Children.Clear(); float width = this.DesiredSize.Width; float height = this.DesiredSize.Height; associatedElement.InitializeRangeSelectorView(width, height); this.topLeftScales = associatedElement.GetTopLeftScales(); this.bottomRightScales = associatedElement.GetBottomRightScales(); foreach (RangeSelectorScaleContainerElement topLeftScale in this.topLeftScales) { ScaleInitializingEventArgs e = new ScaleInitializingEventArgs(topLeftScale); this.OnScaleInitializing(e); if (!e.Cancel) { this.Children.Add((RadElement)e.ScaleElement); } else { topLeftScale.DisplayScale = false; } } foreach (RangeSelectorScaleContainerElement bottomRightScale in this.bottomRightScales) { ScaleInitializingEventArgs e = new ScaleInitializingEventArgs(bottomRightScale); this.OnScaleInitializing(e); if (!e.Cancel) { this.Children.Add((RadElement)e.ScaleElement); } else { bottomRightScale.DisplayScale = false; } } this.ReorderScales(); this.Children.Add((RadElement)this.bodyElement); this.Children.Add((RadElement)this.scrollSelectorElement); associatedElement.AssociatedViewStart = this.StartRange; associatedElement.AssociatedViewEnd = this.EndRange; associatedElement.UpdateAssociatedView(); } this.ElementTree.ApplyThemeToElementTree(); }