First things first: we are using version 2012.2.0725.1040 of the Telerik Silverlight 4 controls.
We have a RadWindow containing a UserControl, which in turn has RadSliders added dynamically in code behind as follows:
The problem we are seeing is that, when you switch focus to another RadWindow and back again (it happens when the focus is regained), the sliders seem to reset back to a '0' value.
Any help would be appreciated.
UPDATE: In addition it seems that after the reset, selecting any of the sliders and trying to move it can cause it to jump back to it's originally set position.
We have a RadWindow containing a UserControl, which in turn has RadSliders added dynamically in code behind as follows:
public
class
CubiksRadSlider : RadSlider
{
public
int
Row {
get
;
set
; }
}
// Add Slider (rowIndex, slider indexes refer to columns rows of a grid)
CubiksRadSlider slider =
new
CubiksRadSlider()
{
Tag =
string
.Format(
"{0}_{1}"
,
"slider"
, rowIndex),
Maximum = _emailReplyViewModel.Email.MessageOptionText.Count,
LargeChange = 1,
Minimum = 0,
SmallChange = 1,
Value = 0,
TickPlacement = TickPlacement.BottomRight,
TickFrequency = 1,
Margin =
new
Thickness(3),
HorizontalAlignment = HorizontalAlignment.Stretch,
VerticalAlignment = VerticalAlignment.Center,
Row = sliderIndex
};
slider.ValueChanged += (s, args) => { slider.Value = Math.Round(slider.Value); };
//Assign it's grid position
slider.SetValue(Grid.RowProperty, rowIndex + 1);
grid.Children.Add(slider);
grid.InvalidateMeasure();
The problem we are seeing is that, when you switch focus to another RadWindow and back again (it happens when the focus is regained), the sliders seem to reset back to a '0' value.
Any help would be appreciated.
UPDATE: In addition it seems that after the reset, selecting any of the sliders and trying to move it can cause it to jump back to it's originally set position.