Telerik Forums
UI for Silverlight Forum
1 answer
28 views
Hallo!

I need a MouseDoubleClick event for RadSlider!
Is there a implementation for that?

I use the RadSlider in the RadChartView to zoom and scroll on the horizontal axis.
I need the MouseDoubleClick event to reset the zoom and scroll (0, 1.0)

Cheers Mike
Pavel R. Pavlov
Telerik team
 answered on 07 Nov 2014
1 answer
67 views
Hello,

I'm using a rad slider, and I want to show the selection range.  However, I want the selection start to always be zero.  Can I set the selection start to 0, and HIDE the start slider bar? So basically what I would have is just one visible slider bar, and everything to the left of the slider bar is always highlighted (selected).

Thanks,
Justin
Justin Lee
Top achievements
Rank 1
 answered on 31 Oct 2014
3 answers
58 views
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:
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.
Kiril Vandov
Telerik team
 answered on 07 Nov 2013
1 answer
97 views
Silverlight 5.0
Windows
IE 10.0.9200 
Silverlight 2013.2 611 JUN 11,2003
Visual Studio 2012 C#

When data binding RadSlider's maximum attribute in range mode, the 2 thumbs are stuck at the left edge of the slider and do not move.
See code below and attached  image
<telerik:RadSlider x:Name="sldFilterByPrice" VerticalAlignment="Center" Margin="20"
                    HandlesVisibility="Visible" IsSelectionRangeEnabled="True"                
                    TickFrequency="20"
                    TickPlacement="TopLeft"
                    TickTemplate="{StaticResource TickTemplate}"
                    IsSnapToTickEnabled="True"                                   
                    Maximum="{Binding SeatFilterData.SeatFilterByPrice.PriceMax, Mode=OneTime}"
                    Minimum="0"
                    SelectionStart="0"
                    SelectionEnd="150"
                    MinimumRangeSpan="0"
                    MaximumRangeSpan="400"                   
                />

It works fine when the Maximum attribute is not bound but set to a number, like 200. See 
I need to have the Maximum, Minimum, SelectionStart and SelectionEnd data bound oneway and be able to move the thumbs between the selection range. 
Is there a way to make it happen?

Thanks.

public class CSeatFilter
    {
        public class CSeatFilterByPrice
        {
            public List<decimal> Prices { get; set; }
            public double PriceMin
            {
                get
                {
                    return (double)Prices.First();
                }
            }
            public double PriceMax
            {
                get
                {
                    return (double)Prices.Last();
                }
            }
            public decimal SelectedPriceMin { get; set; }
            public decimal SelectedPriceMax { get; set; }
             
            public CSeatFilterByPrice()
            {
                Initialize();
            }
 
            private void Initialize()
            {
                Prices = new List<decimal>();
                Prices.Add(0.0M);
                Prices.Add(200.0M);
                SelectedPriceMin = Prices.First()+50;
                SelectedPriceMax = Prices.Last()-50;
                 
            }
        }
 
        private CSeatFilterByPrice _seatFilterByPrice = new CSeatFilterByPrice();
        public CSeatFilterByPrice SeatFilterByPrice { get { return _seatFilterByPrice; } }
Yaron Habot
Top achievements
Rank 1
 answered on 28 Jun 2013
1 answer
19 views
Hello,

I am having an issue with the right thumb slider jumping all the way left when there are sliders in two different windows and I switch between the windows.  Any ideas or workaround would be nice.  Thank you.

Version: 2012.3.1314.1050

Screen cast - http://screencast.com/t/cOQ0FjDt

To Reproduce using the sample code:
Make SomeWindow1 and SomeWindow2 floating
Click on one of the windows then click on the other window

Sample Code:
<telerik:RadDocking x:Name="radDocking1"
                            BorderThickness="0"
                            Padding="0">
            <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadDocumentPane Title="Some Window 1">
                            <telerik:RadDocumentPane.Content>
                                <telerik:RadSlider IsSelectionRangeEnabled="True"
                                                   TickPlacement="TopLeft"
                                                   IsSnapToTickEnabled="False"
                                                   HandlesVisibility="Collapsed"
                                                   Margin="30,0"
                                                   SelectionEnd="100">
                                </telerik:RadSlider>
                            </telerik:RadDocumentPane.Content>
                        </telerik:RadDocumentPane>
                        <telerik:RadDocumentPane Title="Some Window 2">
                            <telerik:RadDocumentPane.Content>
                                <telerik:RadSlider IsSelectionRangeEnabled="True"
                                                   TickPlacement="TopLeft"
                                                   IsSnapToTickEnabled="False"
                                                   HandlesVisibility="Collapsed"
                                                   Margin="30,0"
                                                   SelectionEnd="100">
                                </telerik:RadSlider>
                            </telerik:RadDocumentPane.Content>
                        </telerik:RadDocumentPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>
        </telerik:RadDocking>
Kiril Vandov
Telerik team
 answered on 19 Jun 2013
5 answers
65 views
Hi,

I was wondering if it possible to use the slider to select multiple time zones (timespan) values.

In other words the slider should start at 00:00 and end at 24:00 with steps of 15 minutes. The user should be able to select multiple timespans (start/end) without any overlaps.

The result of the slider should give me all the defined timespans.

Is this possible?
Petar Mladenov
Telerik team
 answered on 17 Jun 2013
1 answer
77 views
We rely on the focus event of several of the Telerik controls to provide help texts for our users. When a control is focused, a short help text is displayed in a TextBlock in another area of the page. RadSlider does fire the focus event when the slider thumb is used, but not when the track part of the slider is clicked. I managed to solve the problem by inheriting from RadSlider and overriding OnApplyTemplate. I then hook up to the Click events of the LargeIncreaseButton and LargeDecreaseButton elements. When either of them are clicked I just focus the slider control manually. See the code below. But it would be nice if we did not have to do this. It seems logical to me that the control should focus when the track is clicked.

public class CustomSlider : RadSlider
{
    private RepeatButton _LargeDecrease;
    private RepeatButton _LargeIncrease;
 
    public override void OnApplyTemplate()
    {
        base.OnApplyTemplate();
 
        if (_LargeDecrease == null || _LargeIncrease == null)
        {
            _LargeDecrease = base.GetTemplateChild("LargeDecreaseButton") as RepeatButton;
            _LargeIncrease = base.GetTemplateChild("LargeIncreaseButton") as RepeatButton;
        }
        else
        {
            _LargeDecrease.Click -= _LargeDecrease_Click;
            _LargeIncrease.Click -= _LargeIncrease_Click;
        }
 
        if (_LargeDecrease != null)
        {
            _LargeDecrease.Click += _LargeDecrease_Click;
        }
 
        if (_LargeIncrease != null)
        {
            _LargeIncrease.Click += _LargeIncrease_Click;
        }
    }
 
    private void _LargeIncrease_Click(object sender, RoutedEventArgs e)
    {
        this.Focus();
    }
 
    private void _LargeDecrease_Click(object sender, RoutedEventArgs e)
    {
        this.Focus();
    }
}
Kiril Vandov
Telerik team
 answered on 15 Apr 2013
1 answer
125 views
Shouldn't I be able to remove this from the tab order with this command?  It still tabs to the buttons and all.

Also the radcombo box is like that too.
Kiril Vandov
Telerik team
 answered on 04 Feb 2013
7 answers
68 views
Hello,

I got a problem using the RadSlider control:
The slider lays in a grid inside of an UserControl in the top center of my application. There are RadExpanders with some content to the left and right side of my UserControl. If one of those expanders is expanded, the grid containing the slider resizes accordingly.

Now, if the SliderThumb is on the MaxValue of the SliderTicks (the very right tick) and the right expander is expanded to the left (making the grid that contains the slider smaller), the SliderThumb disappears. It reappears if the IsExpanded property of the right expander set to false again or once the user changes to slider value.

It seems like the slider is resizing correctly but the SliderThumb is not moving along.

Do you have any workaround for this?
Thank you very much in advance.


Pavel R. Pavlov
Telerik team
 answered on 11 Jan 2013
2 answers
35 views
Hi there.

I have a Silverlight app that makes use of a Slider, bound to the current time position of a media item. I want to track the user's use of the system for analytics. One such event is when a user clicks on the slider to move to a new position. I've been using the MouseLeftButtonDown event but with that I can only determine where the user has moved the slider to and not where it's come from. I need to know both values. I had tried setting a flag in the MouseLeftButtonDown event and then checking that in the ValueChanged event but by the time ValueChanged fired the old and new values were a fraction apart and at a position after where the user had clicked to. I don't want to simply rely on the ValueChanged event as that fires so frequently and I need to know only when the user has manually moved position. Is there a way to determine what the position was that the user moved from?

Thanks in advance.
PaulH
Top achievements
Rank 1
 answered on 24 Dec 2012
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?