Click here to Skip to main content
12,356,612 members (64,575 online)
Click here to Skip to main content

Stats

52.1K views
3.5K downloads
81 bookmarked
Posted

OpenWPFChart: assembling charts from components: Part I - Parts

, 19 Mar 2009 CPOL
Provides the component model along with base components to assemble charts.
trunk
ChartControls
ChartControls.csproj.user
OpenWPFChart.Chart.Icon.png
OpenWPFChart.WellLogChart.Icon.png
Properties
Themes
ChartHelpers
AxisPropertiesDialog
ChartHelpers.csproj.user
ChartScaleControl
FontChooser
ItemPropertiesDialog
Properties
ChartParts
Axes
ChartParts.csproj.user
Grid
Items
Data
DataView
Elements
Visuals
NumericalRecipes
Properties
Scales
ChartParts.vsmdi
SampleDataFiles
WellLog
Samples
ControlSamples
ColumnChartControlSample
Properties
CurveChartControlSample
Properties
WellLogControlSample
Properties
DirectCompositionSamples
BasicSample
Properties
TemperatureSample
Properties
WellLogSample
Properties
// <copyright file="ChartLegend.cs" company="Oleg V. Polikarpotchkin">
// Copyright © 2008-2009 Oleg V. Polikarpotchkin. All Right Reserved
// </copyright>
// <author>Oleg V. Polikarpotchkin</author>
// <email>ov-p@yandex.ru</email>
// <date>2009-02-09</date>
// <summary>OpenWPFChart library. ChartLegend control.</summary>
// <revision>$Id: ChartLegend.cs 18093 2009-03-16 04:15:06Z unknown $</revision>

using System.Windows;
using System.Windows.Controls;

namespace OpenWPFChart.Controls
{
	/// <summary>
	/// ChartLegend control.
	/// </summary>
	/// <remarks>
	/// Helper control to use with Chart controls.
	/// </remarks>
	public class ChartLegend : ListBox
	{
		/// <summary>
		/// Initializes the <see cref="ChartLegend"/> class.
		/// </summary>
		static ChartLegend()
		{
			DefaultStyleKeyProperty.OverrideMetadata(typeof(ChartLegend)
				, new FrameworkPropertyMetadata(typeof(ChartLegend)));
		}

		#region Dependency properties
		#region Title
		/// <summary>
		/// Identifies the Title dependency property.
		/// </summary>
		public static readonly DependencyProperty TitleProperty
			= DependencyProperty.Register("Title", typeof(string), typeof(ChartLegend)
				, new FrameworkPropertyMetadata("Legend"
					, FrameworkPropertyMetadataOptions.AffectsMeasure
						| FrameworkPropertyMetadataOptions.AffectsRender
					)
				);
		/// <summary>
		/// Gets or sets a Legend Title property. This is a dependency property.
		/// </summary>
		/// <value>TitleProperty value</value>
		public string Title
		{
			get { return (string)GetValue(TitleProperty); }
			set { SetValue(TitleProperty, value); }
		}
		#endregion Title

		#region CornerRadius
		/// <summary>
		/// Identifies the CornerRadiusProperty dependency property.
		/// </summary>
		public static readonly DependencyProperty CornerRadiusProperty
			= Border.CornerRadiusProperty.AddOwner(typeof(ChartLegend));
		/// <summary>
		/// Gets or sets a value that represents the degree to which the corners of a Legend Border 
		/// are rounded. This is a dependency property.
		/// </summary>
		/// <value>CornerRadiusProperty value.</value>
		public CornerRadius CornerRadius
		{
			get { return (CornerRadius)GetValue(CornerRadiusProperty); }
			set { SetValue(CornerRadiusProperty, value); }
		}
		#endregion CornerRadius
		#endregion Dependency properties
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Oleg V. Polikarpotchkin
Team Leader
Russian Federation Russian Federation
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160621.1 | Last Updated 19 Mar 2009
Article Copyright 2009 by Oleg V. Polikarpotchkin
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid