Esempio n. 1
0
        public virtual void OnScaleInitializing(ScaleInitializingEventArgs e)
        {
            ScaleInitializingEventHandler scaleInitializing = this.ScaleInitializing;

            if (scaleInitializing == null)
            {
                return;
            }
            scaleInitializing((object)this, e);
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
 private void rangeSelectorElement_ScaleInitializing(object sender, ScaleInitializingEventArgs e)
 {
     this.OnScaleInitializing(e);
 }