internal void OnChanged(ILAxis sender, AxisNames axis) { if (Changed != null) { Changed(sender, new ILAxisChangedEventArgs(axis)); } }
protected void Axis_Changed(object sender, EventArgs e) { Invalidate(); if (sender is ILAxis && sender != null) { ILAxis ax = (ILAxis)sender; OnChanged(ax, (AxisNames)ax.Index); } }
public ILAxisWrapper(ILAxis source, ILPanelEditor editor, string path, string name = null, string label = null) : base(source, editor, path, String.IsNullOrEmpty(name) ? source.AxisName.ToString().Replace(" ", String.Empty) : name, String.IsNullOrEmpty(label) ? source.AxisName.ToString() : label) { this.source = source; this.label = new ILLabelWrapper(source.Label, editor, Path, ILAxis.LabelTag, "AxisLabel"); scaleLabel = new ILLabelWrapper(source.ScaleLabel, editor, Path, ILAxis.ScaleLabelTag, "ScaleLabel"); ticks = new ILTickCollectionWrapper(source.Ticks, editor, Path, "TicksCollection"); gridMajor = new ILLinesWrapper(source.GridMajor, editor, Path, ILAxis.GridMajorLinesTag, "GridMajor"); gridMinor = new ILLinesWrapper(source.GridMinor, editor, Path, ILAxis.GridMinorLinesTag, "GridMinor"); }
internal void OnChanged(ILAxis sender, AxisNames axis) { if (Changed != null) Changed(sender ,new ILAxisChangedEventArgs(axis)); }
/// <summary> /// This function gets called by ILTickCollection on every attempt to build/render the ticks for an axis. Here /// it is called from the colorbar rendering code. Implementors of this function can provide their own tick collections. /// Often such custom ticks are based on the standard implementation provided by ILTickCollection.CreateTicksAuto(). /// </summary> /// <param name="min">min value for the axis range</param> /// <param name="max">max value for the axis range</param> /// <param name="numberTicks">rough estimate of how many ticks will fit inside the availabel space for the the whole axis scale</param> /// <param name="axis">a reference to the axis referenced by the tick collection</param> /// <param name="scale">type of scaling of the axis. For ILColorbar: linear only</param> /// <returns>Your own collection of ticks for rendering</returns> IEnumerable <ILTick> MyTicksCreationFunc(float min, float max, int numberTicks, ILAxis axis, AxisScale scale = AxisScale.Linear) { // a custom tick creating function: use the standard ticks collection and add custom ticks for min and max values return(ILTickCollection.CreateTicksAuto(min, max, numberTicks, axis, scale) .Concat(new [] { createTick(min), createTick(max) })); }