Hi,
I'm not sure what I am doing wrong here. Could you please help me. I'm trying to bind various properties of an XamChart and it seems to ignore the returned result. Underneath is an example :
<igCA:Axis.Stripes> <igCA:Stripe Unit="{Binding Path=SelectedValue, Converter={StaticResource CrossingConverter}, ElementName=AccountComboBox, Mode=Default}"/></igCA:Axis.Stripes>
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { return null; }}
The value converter code is getting called and returning a value, however whenever I look at the value stored in the Unit it is always 0.
Thanks,
Graeme
PS. XamChart is looking like it will be a very good product.
i tried this on my machine ... simplified in a few places... following is the complete solution.
<Window x:Class="WpfApplication2.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:igCA="clr-namespace:Infragistics.Windows.Chart;assembly=Infragistics3.Wpf.Chart.v7.2"
xmlns:local="clr-namespace:WpfApplication2"
Title="Window1" Height="300" Width="300">
<Window.Resources>
<local:CrossingConverter x:Key="CrossingConverter1" />
</Window.Resources>
<Canvas>
<ComboBox x:Name="AccountComboBox" Width="100" Height="25" />
<igCA:XamChart Width="250" Height="250" Canvas.Top="30">
<igCA:XamChart.Axes>
<igCA:Axis AxisType="PrimaryX">
<igCA:Axis.Stripes>
<igCA:Stripe Unit="{Binding Path=SelectedValue, Converter={StaticResource CrossingConverter1}, ElementName=AccountComboBox, Mode=Default}" />
</igCA:Axis.Stripes>
</igCA:Axis>
</igCA:XamChart.Axes>
</igCA:XamChart>
</Window>
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Windows.Data;
using System.Windows;
{
/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
public partial class Window1 : Window
InitializeComponent();
new Account { Name = "Paul", Value = 2},
};
}
public class Account
public double Value { get; set; }
public class CrossingConverter : IValueConverter
Account acct = value as Account;
#endregion