Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
BREAKING CHANGE: renamed SerialChart.CategoryValuePath to CategoryVal…
Browse files Browse the repository at this point in the history
…ueMemberPath for consistency.
  • Loading branch information
ailon committed May 5, 2010
1 parent 653c503 commit 1e5a22c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion QuickCharts/Window1.xaml
Expand Up @@ -10,7 +10,7 @@
</Grid.RowDefinitions>
<amq:SerialChart x:Name="chart1"
DataSource="{Binding Data}"
CategoryValuePath="cat1"
CategoryValueMemberPath="cat1"
Background="White"
BorderBrush="Black"
BorderThickness="1"
Expand Down
2 changes: 1 addition & 1 deletion QuickChartsSLApp/App.xaml.cs
Expand Up @@ -26,7 +26,7 @@ public App()

private void Application_Startup(object sender, StartupEventArgs e)
{
this.RootVisual = new PieChart();
this.RootVisual = new MainPage();
}

private void Application_Exit(object sender, EventArgs e)
Expand Down
2 changes: 1 addition & 1 deletion QuickChartsSLApp/MainPage.xaml
Expand Up @@ -10,7 +10,7 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<amq:SerialChart x:Name="chart1"
DataSource="{Binding Data}" CategoryValuePath="cat1"
DataSource="{Binding Data}" CategoryValueMemberPath="cat1"
Background="LightBlue"
BorderBrush="Black"
BorderThickness="1"
Expand Down
16 changes: 8 additions & 8 deletions QuickChartsWPF/SerialChart.cs
Expand Up @@ -341,21 +341,21 @@ private void OnDataSourceCollectionChanged(object sender, NotifyCollectionChange
}

/// <summary>
/// Identifies <see cref="CategoryValuePath"/> dependency property.
/// Identifies <see cref="CategoryValueMemberPath"/> dependency property.
/// </summary>
public static readonly DependencyProperty CategoryValuePathProperty = DependencyProperty.Register(
"CategoryValuePath", typeof(string), typeof(SerialChart),
public static readonly DependencyProperty CategoryValueMemberPathProperty = DependencyProperty.Register(
"CategoryValueMemberPath", typeof(string), typeof(SerialChart),
new PropertyMetadata(null)
);

/// <summary>
/// Gets or sets path to the property holding category values in data source.
/// This is a dependency property.
/// </summary>
public string CategoryValuePath
public string CategoryValueMemberPath
{
get { return (string)GetValue(CategoryValuePathProperty); }
set { SetValue(CategoryValuePathProperty, value); }
get { return (string)GetValue(CategoryValueMemberPathProperty); }
set { SetValue(CategoryValueMemberPathProperty, value); }
}

private Dictionary<string, List<double>> _values = new Dictionary<string, List<double>>();
Expand Down Expand Up @@ -403,9 +403,9 @@ private void ProcessData()
private void ProcessCategoryData()
{
_categoryValues.Clear();
if (this.DataSource != null && !string.IsNullOrEmpty(CategoryValuePath))
if (this.DataSource != null && !string.IsNullOrEmpty(CategoryValueMemberPath))
{
BindingEvaluator eval = new BindingEvaluator(CategoryValuePath);
BindingEvaluator eval = new BindingEvaluator(CategoryValueMemberPath);
foreach (object dataItem in this.DataSource)
{
_categoryValues.Add(eval.Eval(dataItem).ToString());
Expand Down

0 comments on commit 1e5a22c

Please sign in to comment.