In This Article

PieChart Class

A control that displays a pie chart based on given data.

public class PieChart : Control
Inheritance:
object Visual UIElement FrameworkElement Control object
Derived:
DonutChart

Constructors

PieChart()

Initializes an instance of the class.

public PieChart()

Properties

DrawingSurfaceSize

The size of the drawing surface.

protected Size DrawingSurfaceSize { get; }

Property Value

Size

IsLegendVisible

Indicates whether the legend is visible.

public bool IsLegendVisible { get; set; }

Property Value

bool

LegendHorizontalPosition

The legend horizontal position.

public LegendHorizontalPosition LegendHorizontalPosition { get; set; }

Property Value

LegendHorizontalPosition

LegendMargin

The legend margin.

public Thickness LegendMargin { get; set; }

Property Value

Thickness

LegendStyle

The legend style. Must have a TargetType of Legend.

public Style? LegendStyle { get; set; }

Property Value

Style

LegendVerticalPosition

The legend vertical position.

public LegendVerticalPosition LegendVerticalPosition { get; set; }

Property Value

LegendVerticalPosition

Series

The series.

public ObservableCollection<PieSeries> Series { get; }

Property Value

ObservableCollection<PieSeries>

TetherBrush

The brush used for label tethers.

public Brush? TetherBrush { get; set; }

Property Value

Brush

Remarks

If TetherBrush is not set, then Foreground will be used instead.

Methods

MeasureOverride(Size)

Called to remeasure a control.

protected override Size MeasureOverride(Size availableSize)
Parameter Type Description
availableSize Size

Returns

Size:

The size of the control, up to the maximum specified by constraint.

OnApplyTemplate()

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

public override void OnApplyTemplate()

Refresh()

Refreshes this instance.

public void Refresh()

Fields

IsLegendVisibleProperty

Defines the IsLegendVisible property.

public static readonly DependencyProperty IsLegendVisibleProperty

LegendHorizontalPositionProperty

Defines the LegendHorizontalPosition property.

public static readonly DependencyProperty LegendHorizontalPositionProperty

LegendMarginProperty

Defines the LegendMargin property.

public static readonly DependencyProperty LegendMarginProperty

LegendStyleProperty

Defines the LegendStyle property.

public static readonly DependencyProperty LegendStyleProperty

LegendVerticalPositionProperty

Defines the LegendVerticalPosition property.

public static readonly DependencyProperty LegendVerticalPositionProperty

TetherBrushProperty

Defines the TetherBrush property.

public static readonly DependencyProperty TetherBrushProperty

Extension Methods