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 a new instance of the DataPointLabeler class.

public DataPointLabeler()

Properties

LabelCollisionMode

Gets or sets the label collision mode.

public LabelCollisionMode LabelCollisionMode { get; set; }

Property Value

LabelCollisionMode:

The label collision mode.

LabelExcess

Gets the excess space outside of bounds taken up by the labels.

public virtual Thickness LabelExcess { get; }

Property Value

Thickness:

The excess space outside of bounds taken up by the labels.

PlotMargin

Gets or sets the plot margin.

public Thickness PlotMargin { get; set; }

Property Value

Thickness:

The plot margin.

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 to build the label from.

ClearLabels()

Clears all labels.

public virtual void ClearLabels()

FinalizeLabels(Size)

Finalizes the labels. Called after all labels have been added for this draw operation.

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

NotifyMouseExited()

Notifies that the mouse exited.

public void NotifyMouseExited()

NotifyMouseMoved(Point)

Notifies that the mouse was 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 (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.

public override void OnApplyTemplate()

Fields

LabelCollisionModeProperty

Identifies the LabelCollisionMode dependency property. This field is read-only.

public static readonly DependencyProperty LabelCollisionModeProperty