In This Article

PieChart Class

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

public class PieChart : Control, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IPieChartPlotInfo
Inheritance:
Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control Object
Derived:
DonutChart

Constructors

PieChart()

Initializes a new instance of the PieChart class.

public PieChart()

Properties

DrawingSurfaceSize

Gets or sets the size of the drawing surface.

protected Size DrawingSurfaceSize { get; }

Property Value

Size:

Size.

IsLegendVisible

Gets or sets a value indicating whether this instance is legend visible.

public bool IsLegendVisible { get; set; }

Property Value

Boolean:

true if this instance is legend visible; otherwise, false.

LegendHorizontalPosition

Gets or sets the legend horizontal position.

public LegendHorizontalPosition LegendHorizontalPosition { get; set; }

Property Value

LegendHorizontalPosition:

The legend horizontal position.

LegendMargin

Gets or sets the legend margin.

public Thickness LegendMargin { get; set; }

Property Value

Thickness:

The legend margin.

LegendStyle

Gets or sets the legend style. Must have a TargetType of Legend.

public Style LegendStyle { get; set; }

Property Value

Style:

The legend style.

LegendVerticalPosition

Gets or sets the legend vertical position.

public LegendVerticalPosition LegendVerticalPosition { get; set; }

Property Value

LegendVerticalPosition:

The legend vertical position.

Series

Gets the series.

public ObservableCollection<PieSeries> Series { get; }

Property Value

ObservableCollection<PieSeries>:

The series.

TetherBrush

Gets or sets the brush used to draw label tethers. If TetherBrush is not set, then Foreground will be used instead.

public Brush TetherBrush { get; set; }

Property Value

Brush:

The tether brush.

Methods

MeasureOverride(Size)

Provides the behavior for the Measure pass of layout. Classes can override this method to define their own Measure pass behavior.

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

The available size that this object can give to child objects. Infinity (PositiveInfinity) can be specified as a value to indicate that the object will size to whatever content is available.

Returns

Size:

The size that this object determines it needs during layout, based on its calculations of the allocated sizes for child objects; or based on other considerations, such as a fixed container size.

OnApplyTemplate()

Invoked whenever application code or internal processes call ApplyTemplate.

public override void OnApplyTemplate()

Refresh()

Refreshes this instance.

public void Refresh()

Fields

IsLegendVisibleProperty

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

public static readonly DependencyProperty IsLegendVisibleProperty

LegendHorizontalPositionProperty

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

public static readonly DependencyProperty LegendHorizontalPositionProperty

LegendMarginProperty

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

public static readonly DependencyProperty LegendMarginProperty

LegendStyleProperty

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

public static readonly DependencyProperty LegendStyleProperty

LegendVerticalPositionProperty

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

public static readonly DependencyProperty LegendVerticalPositionProperty

TetherBrushProperty

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

public static readonly DependencyProperty TetherBrushProperty

Inherited Members

Extension Methods