コード例 #1
0
        protected override void OnVisualTreeChanged(AbcVisualTree oldVisualTree)
        {
            base.OnVisualTreeChanged(oldVisualTree);

            if (oldVisualTree != null)
            {
                this.ticksPool.Clear();
                this.ticksPool = null;
                this.labelsPool.Clear();
                this.labelsPool = null;
                this.canvas.Children.Clear();
                this.Canvas   = null;
                this.axisLine = null;
            }

            if (this.VisualTree != null)
            {
                this.Canvas = (IAbcCanvas)this.VisualTree.CreateVisual(typeof(IAbcCanvas));
                this.Canvas.SetContextualPropertyValue(AbcControlContextualProperties.ControlPropertyKey, new AbcContextualPropertyValue.AbcObject {
                    value = this
                });
                this.ticksPool  = new AbcVisualsPool <IAbcRectangle>(this.Canvas, this.CreateTick);
                this.labelsPool = new AbcVisualsPool <IAbcLabel>(this.Canvas, this.CreateLabel);
            }
        }
コード例 #2
0
        internal WFControlCoordinator(Control nativeControl, T abcControl, AbcVisualTree visualTree)
        {
            this.nativeControl         = nativeControl;
            this.abcControl            = abcControl;
            this.visualTree            = visualTree;
            this.abcControl.VisualTree = visualTree;

            this.abcControl.InvalidationRequest += this.AbcControl_InvalidationRequest;
        }
コード例 #3
0
        public WpfNumericAxisControl()
        {
            string test = nameof(WpfRenderingVisualTree);

            AbcVisualTree visualTree = null;

            if (test == nameof(WpfVisualTree))
            {
                visualTree = new WpfVisualTree();
            }
            else if (test == nameof(WpfRenderingVisualTree))
            {
                visualTree = new WpfRenderingVisualTree();
            }

            this.controlCoordinator = new WpfControlCoordinator <AbcNumericAxisControl>(this, new AbcNumericAxisControl(), visualTree);
            this.controlCoordinator.abcControl.UserMin  = this.Minimum;
            this.controlCoordinator.abcControl.UserMax  = this.Maximum;
            this.controlCoordinator.abcControl.UserStep = this.Step;
        }
コード例 #4
0
        public WFNumericAxisControl()
        {
            string test = nameof(WFVisualTree);

            AbcVisualTree visualTree = null;

            if (test == nameof(WFVisualTree))
            {
                visualTree = new WFVisualTree();
            }

            this.controlCoordinator = new WFControlCoordinator <AbcNumericAxisControl>(this, new AbcNumericAxisControl(), visualTree);
            this.controlCoordinator.abcControl.UserMin  = this.Minimum;
            this.controlCoordinator.abcControl.UserMax  = this.Maximum;
            this.controlCoordinator.abcControl.UserStep = this.Step;
            this.controlCoordinator.NativeControlRoot   = new Panel();
            this.Controls.Add(this.controlCoordinator.NativeControlRoot);

            this.Minimum = 0;
            this.Maximum = 100;
            this.Step    = 25;
        }
コード例 #5
0
ファイル: WpfVisual.cs プロジェクト: petar-k-marchev/abc
 protected virtual void OnVisualTreeChanged(AbcVisualTree oldVisualTree)
 {
 }