/// <summary> /// Assign the reference and perform your custom class initialization. /// </summary> /// <param name="reference"></param> public override void AssignReference(AutomationReference reference) { // Make sure the base is first assigned. base.AssignReference(reference); }
/// <summary> /// Assign the reference and perform your custom class initialization. /// </summary> /// <param name="reference"></param> public override void AssignReference(AutomationReference reference) { // Make sure the base is first assigned. base.AssignReference(reference); // get the axis line Line axisLine = this.Find.ByType<Line>(); // get the axis line X1, X2, Y1 and Y2 values this._X1Value = axisLine.X1; this._X2Value = axisLine.X2; this._Y1Value = axisLine.Y1; this._Y2Value = axisLine.Y2; // get the axis line StrokeThickness this.axisLineStrokeThickness = axisLine.StrokeThickness; // get the axis line color SolidColorBrush brush2 = axisLine.Stroke as SolidColorBrush; this.axisLineColor = brush2 == null ? null : brush2.Color; }