Hi.
I have a problem setting minimum or maximum values for a RadSlider I need to generate by c# code inside a propertygrid with the help of FrameworkElementFactory.
Value binding and setting the grid column work perfectly but I am not able to set min or max slider value (and tickfrequency, too - are they readonly?).
What do I do wrong here? Or is there a better way to add properties like a radslider control inside a radpropertygrid on the fly?
Lars
Here is a code snipet:
I have a problem setting minimum or maximum values for a RadSlider I need to generate by c# code inside a propertygrid with the help of FrameworkElementFactory.
Value binding and setting the grid column work perfectly but I am not able to set min or max slider value (and tickfrequency, too - are they readonly?).
What do I do wrong here? Or is there a better way to add properties like a radslider control inside a radpropertygrid on the fly?
Lars
Here is a code snipet:
FrameworkElementFactory slider = new FrameworkElementFactory(typeof(RadSlider));
slider.SetBinding(RadSlider.ValueProperty, new Binding(path) { Mode = BindingMode.TwoWay });
slider.SetValue(RadSlider.MinimumProperty, 0);
slider.SetValue(RadSlider.MaximumProperty, 100);
slider.SetValue(Grid.ColumnProperty, 1);