how can I set the converter binding in the C# code?

Viewed 17332

I am newbie in WPF and now I am using a 3rd party lib xamChart in my project

previously in the XAML i have a Chart and its axis has a Unit which is a int property and I have

Unit="{Binding NextStartRow, Converter={StaticResource UnitConverter}}"

This works perfectly, but now I need to create the chart in the runtime through the code behind. How can I do that in C#? and FYI all the axis.Unit.xxx in the c# code do not have the thing I want, Please help, thank you very much in advance, any suggestion is much appreciated!

FYI code snippet in of xaml

<igCA:Axis AxisType="PrimaryX" AutoRange="True"  
           Unit="{Binding AnotherIntegerProperty, Converter={StaticResource UnitConverter}}">
1 Answers
Related