// -------------------------------------------------------------------------------------------------------------------- // // Copyright (c) 2014 OxyPlot contributors // // // Represents a tracker definition. // // -------------------------------------------------------------------------------------------------------------------- using Avalonia; using Avalonia.Markup.Xaml.Templates; namespace OxyPlot.Avalonia { /// /// Represents a tracker definition. /// /// The tracker definitions make it possible to show different trackers for different series. /// The property is matched with the /// in the TrackerDefinitions collection in the control. public class TrackerDefinition : AvaloniaObject { /// /// Identifies the dependency property. /// public static readonly StyledProperty TrackerKeyProperty = AvaloniaProperty.Register(nameof(TrackerKey)); /// /// Identifies the dependency property. /// public static readonly StyledProperty TrackerTemplateProperty = AvaloniaProperty.Register(nameof(TrackerTemplate)); /// /// Gets or sets the tracker key. /// /// The Plot will use this property to find the TrackerDefinition that matches the TrackerKey of the current series. public string TrackerKey { get { return GetValue(TrackerKeyProperty); } set { SetValue(TrackerKeyProperty, value); } } /// /// Gets or sets the tracker template. /// /// The tracker control will be added/removed from the Tracker overlay as necessary. /// The DataContext of the tracker will be set to a TrackerHitResult with the current tracker data. public ControlTemplate TrackerTemplate { get { return GetValue(TrackerTemplateProperty); } set { SetValue(TrackerTemplateProperty, value); } } } }