In This Article

DataPointLabeler Class

Responsible for displaying labels for data points.

[TemplatePart(Name = "PART_LayoutCanvas", Type = typeof(Canvas))]
public class DataPointLabeler : Control
Inheritance:
object Visual UIElement FrameworkElement Control object

Constructors

DataPointLabeler()

Initializes an instance of the class.

public DataPointLabeler()

Properties

LabelCollisionMode

The label collision mode.

public LabelCollisionMode LabelCollisionMode { get; set; }

Property Value

LabelCollisionMode

LabelExcess

The label excess. This is the amount of space that the label extends outside the bounds of the labeler.

public virtual Thickness LabelExcess { get; }

Property Value

Thickness

PlotMargin

The plot margin.

public Thickness PlotMargin { get; set; }

Property Value

Thickness

Methods

AddLabel(LabelInfo)

Adds a label based on a given LabelInfo.

public virtual void AddLabel(LabelInfo labelInfo)
Parameter Type Description
labelInfo LabelInfo

The label info.

ClearLabels()

Clears existing data point labels.

public virtual void ClearLabels()

FinalizeLabels(Size)

Finalizes the labels. Should be called after all labels have been added.

public void FinalizeLabels(Size plotSize)
Parameter Type Description
plotSize Size

NotifyMouseExited()

Notifies that the mouse exited.

public void NotifyMouseExited()

NotifyMouseMoved(Point)

Notifies the data point labeler that the mouse moved.

public void NotifyMouseMoved(Point mousePosition)
Parameter Type Description
mousePosition Point

The mouse position.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

Fields

LabelCollisionModeProperty

Defines the LabelCollisionMode property.

public static readonly DependencyProperty LabelCollisionModeProperty

Extension Methods