/// <summary> /// Tickses the position changed. /// </summary> /// <param name="d">The d.</param> /// <param name="e">The <see cref="System.Windows.Controls.SelectionChangedEventArgs"/> instance containing the event data.</param> void TicksPositionChanged(object d, SelectionChangedEventArgs e) { if (m_scale != null) { int count = m_scale.Ticks.Count; for (int i = 0; i < count; i++) { if (m_scale.Ticks[i] is LinearMarkTick) { LinearMarkTick tick = m_scale.Ticks[i] as LinearMarkTick; switch (this.TicksPositionComboBox.SelectedIndex) { // Set TickPlacement as Inside case 0: tick.TickPlacement = ScalePlacement.Inside; break; // Set TickPlacement as Cross case 1: tick.TickPlacement = ScalePlacement.Cross; break; // Set TickPlacement as Outside case 2: tick.TickPlacement = ScalePlacement.Outside; break; } } } } }
/// <summary> /// Tickses the shape changed. /// </summary> /// <param name="d">The d.</param> /// <param name="e">The <see cref="System.Windows.Controls.SelectionChangedEventArgs"/> instance containing the event data.</param> void TicksShapeChanged(object d, SelectionChangedEventArgs e) { if (m_scale != null) { int count = m_scale.Ticks.Count; for (int i = 0; i < count; i++) { if (m_scale.Ticks[i] is LinearMarkTick) { LinearMarkTick tick = m_scale.Ticks[i] as LinearMarkTick; switch (this.TicksShapeComboBox.SelectedIndex) { // Set TickShape as Rectangle case 0: tick.TickShape = TickShape.Rectangle; break; // Set TickShape as RoundedRectangle case 1: tick.TickShape = TickShape.RoundedRectangle; break; // Set TickShape as Ellipse case 2: tick.TickShape = TickShape.Ellipse; break; // Set TickShape as Triangle case 3: tick.TickShape = TickShape.Triangle; break; } } } } }