So instead of sayingNumericYAxis xmYAxis = new NumericYAxis();xmYAxis.MinimumValue = 0;xmYAxis.MaximumValue = 2000;I would like to bind it an object of...Class AxisRangeObject{ public float MaxYAxisRange { get; set; } public float MinYAxisRange { get; set; }}Is it possible at all?
You want to set up the bindings in the code behind?
You could do something like this:
var yAxis = new NumericYAxis(); yAxis.SetBinding(NumericAxisBase.MinimumValueProperty, new Binding("MinYAxisRange") { Source = rangeObject }); yAxis.SetBinding(NumericAxisBase.MaximumValueProperty, new Binding("MaxYAxisRange") { Source = rangeObject });
where rangeObject is the instance of the AxisRangeObject you want to bind to. Note for updates to actually pass through the binding, you would have to make your AxisRangeObject class implement INotifyPropertyChanged.
-Graham
Cool that worked. Is there someway I can bind for AxisLabelSettings.Location and visible property.