In This Article

MicroBulletGraph Class

Represents a bullet graph control that has a primary featured measure and optionally compares that measure to another measure to enrich its meaning, while also displaying this information in the context of qualitative ranges of performance (poor, satisfactory, good, etc.).

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

Constructors

MicroBulletGraph()

Initializes a new instance of the MicroBulletGraph class.

public MicroBulletGraph()

Properties

ComparativeMeasureAscent

Gets or sets a Unit indicating the ascent of the comparative measure bar. This is a dependency property.

public Unit ComparativeMeasureAscent { get; set; }

Property Value

Unit:

A Unit indicating the ascent of the comparative measure bar. The default value is 66.7%.

Remarks

Ascent is height when in a horizontal graph, and width when in a vertical graph.

ComparativeMeasureBrush

Gets or sets the Brush used to render the comparative measure bar. This is a dependency property.

public Brush ComparativeMeasureBrush { get; set; }

Property Value

Brush:

The Brush used to render the comparative measure bar. The default value is null.

Remarks

When this value is null, a brush will be auto-generated from the ThemeBaseColor.

ComparativeMeasureExtent

Gets or sets a Unit indicating the extent of the comparative measure bar. This is a dependency property.

public Unit ComparativeMeasureExtent { get; set; }

Property Value

Unit:

A Unit indicating the extent of the comparative measure bar. The default value is 2.

Remarks

Extent is width when in a horizontal graph, and height when in a vertical graph.

ComparativeMeasureValue

Gets or sets the value represented by the comparative measure bar. This is a dependency property.

public double ComparativeMeasureValue { get; set; }

Property Value

double:

The value represented by the comparative measure bar. The default value is NaN, meaning don't show a comparative measure.

FeaturedMeasureAscent

Gets or sets a Unit indicating the ascent of the featured measure bar. This is a dependency property.

public Unit FeaturedMeasureAscent { get; set; }

Property Value

Unit:

A Unit indicating the ascent of the featured measure bar. The default value is 33.3%.

Remarks

Ascent is height when in a horizontal graph, and width when in a vertical graph.

FeaturedMeasureBrush

Gets or sets the Brush used to render the featured measure bar. This is a dependency property.

public Brush FeaturedMeasureBrush { get; set; }

Property Value

Brush:

The Brush used to render the featured measure bar. The default value is null.

Remarks

When this value is null, a brush will be auto-generated from the ThemeBaseColor.

FeaturedMeasureValue

Gets or sets the value represented by the featured measure bar. This is a dependency property.

public double FeaturedMeasureValue { get; set; }

Property Value

double:

The value represented by the featured measure bar. The default value is 0.0.

LegendStringFormat

Gets or sets the format that the MicroBulletGraph control will display in a tool tip. This is a dependency property.

public string LegendStringFormat { get; set; }

Property Value

string:

The string format that determines how to display a tool tip. The default value is null.

Remarks

The format string will be passed the following parameters:

  • {0} - The featured measure value.
  • {1} - The projected measure value.
  • {2} - The comparative measure value.
  • {3} - The minimum value.
  • {4} - The maximum value.
  • {5} - The value of the first qualitative range.
  • {6} - The value of the second qualitative range.
  • {7} - The value of the third qualitative range.
  • {8} - The value of the fourth qualitative range.
  • {9} - The value of the fifth qualitative range.

Maximum

Gets or sets the maximum value displayed by the control. This is a dependency property.

public double Maximum { get; set; }

Property Value

double:

The maximum value displayed by the control. The default value is NaN, meaning auto-calculate.

Minimum

Gets or sets the minimum value displayed by the control. This is a dependency property.

public double Minimum { get; set; }

Property Value

double:

The minimum value displayed by the control. The default value is NaN, meaning auto-calculate.

Orientation

Gets or sets the orientation of the MicroBulletGraph. This is a dependency property.

public Orientation Orientation { get; set; }

Property Value

Orientation:

The orientation of the MicroBulletGraph. The default value is Horizontal.

ProjectedMeasureBrush

Gets or sets the Brush used to render the projected measure bar. This is a dependency property.

public Brush ProjectedMeasureBrush { get; set; }

Property Value

Brush:

The Brush used to render the projected measure bar. The default value is null.

Remarks

When this value is null, a brush will be auto-generated from the ThemeBaseColor.

ProjectedMeasureValue

Gets or sets the value represented by the projected measure bar. This is a dependency property.

public double ProjectedMeasureValue { get; set; }

Property Value

double:

The value represented by the projected measure bar. The default value is NaN, meaning don't display a projected measure.

QualitativeRanges

Gets the chart's collection of qualitative ranges.

public MicroQualitativeRangeCollection QualitativeRanges { get; }

Property Value

MicroQualitativeRangeCollection:

The chart's collection of qualitative ranges. The default value is null.

ThemeBaseColor

Gets or sets the base Color to use when auto-generating brushes for rendering the graph. This is a dependency property.

public Color ThemeBaseColor { get; set; }

Property Value

Color:

The base Color to use when auto-generating brushes for rendering the graph. The default value is #000000.

Methods

OnApplyTemplate()

Invoked whenever application code or internal processes call ApplyTemplate.

public override void OnApplyTemplate()

OnCreateAutomationPeer()

When implemented in a derived class, returns class-specific AutomationPeer implementations for the Silverlight automation infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The class-specific AutomationPeer subclass to return.

OnSizeChanged(object, SizeChangedEventArgs)

Handles the SizeChanged event of the control.

protected virtual void OnSizeChanged(object sender, SizeChangedEventArgs e)
Parameter Type Description
sender object

The source of the event.

e SizeChangedEventArgs

The SizeChangedEventArgs instance containing the event data.

Refresh()

Updates the chart based on the current state.

public void Refresh()

Fields

ComparativeMeasureAscentProperty

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

public static readonly DependencyProperty ComparativeMeasureAscentProperty

ComparativeMeasureBrushProperty

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

public static readonly DependencyProperty ComparativeMeasureBrushProperty

ComparativeMeasureExtentProperty

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

public static readonly DependencyProperty ComparativeMeasureExtentProperty

ComparativeMeasureValueProperty

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

public static readonly DependencyProperty ComparativeMeasureValueProperty

FeaturedMeasureAscentProperty

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

public static readonly DependencyProperty FeaturedMeasureAscentProperty

FeaturedMeasureBrushProperty

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

public static readonly DependencyProperty FeaturedMeasureBrushProperty

FeaturedMeasureValueProperty

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

public static readonly DependencyProperty FeaturedMeasureValueProperty

LegendStringFormatProperty

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

public static readonly DependencyProperty LegendStringFormatProperty

MaximumProperty

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

public static readonly DependencyProperty MaximumProperty

MinimumProperty

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

public static readonly DependencyProperty MinimumProperty

OrientationProperty

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

public static readonly DependencyProperty OrientationProperty

ProjectedMeasureBrushProperty

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

public static readonly DependencyProperty ProjectedMeasureBrushProperty

ProjectedMeasureValueProperty

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

public static readonly DependencyProperty ProjectedMeasureValueProperty

ThemeBaseColorProperty

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

public static readonly DependencyProperty ThemeBaseColorProperty