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); } }
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; }
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; }
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; }
protected virtual void OnVisualTreeChanged(AbcVisualTree oldVisualTree) { }