Hi
[reproduce and phenomenon]
Bind the RadSlider's SelectionStart/SelectionEnd to Application's DependencyProperty.
When Slider's Thumb is dragged out of the control, values which exceed Minimum/Maximum
Property are substituted into the Property.
This problem did not occur in the Q1 2011.
If there is any way to avoid the above phenomenon, please let me know.
[VS Project]
RadSliderTest Project
[XAML]
[CS]
[reproduce and phenomenon]
Bind the RadSlider's SelectionStart/SelectionEnd to Application's DependencyProperty.
When Slider's Thumb is dragged out of the control, values which exceed Minimum/Maximum
Property are substituted into the Property.
This problem did not occur in the Q1 2011.
If there is any way to avoid the above phenomenon, please let me know.
- RadControl for WPF (Version: 2011.2.712.40)
- OS:Windows7 Ultimate 64 bit
- VisualStudio 2010 SP1
[VS Project]
RadSliderTest Project
[XAML]
<Window xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="RadSliderTest.MainWindow" Title="RadSlider TEST" Width="640" Height="320" Background="#FF393838" TextBlock.Foreground="White" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" MinHeight="48"/> <RowDefinition Height="Auto" MinHeight="32"/> <RowDefinition Height="Auto" MinHeight="48"/> <RowDefinition Height="Auto" MinHeight="32"/> <RowDefinition Height="Auto" MinHeight="48"/> <RowDefinition Height="Auto" MinHeight="32"/> </Grid.RowDefinitions> <TextBlock Margin="8,8,8,2" Text="RadSlider(SelectionRangeEnable, Minimun:0.0, Maximum1.0) " VerticalAlignment="Bottom" FontSize="16" FontWeight="Bold"/> <telerik:RadSlider x:Name="radSlider" Margin="8" VerticalAlignment="Center" SelectionStart="{Binding RangeBegin, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type Window}} }" SelectionEnd="{Binding RangeEnd, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type Window}} }" IsSelectionRangeEnabled="True" Grid.Row="1"/> <TextBlock Margin="8,8,8,2" Grid.Row="2" Text="MainWindow DependencyProperty Binding" VerticalAlignment="Bottom" FontSize="16" FontWeight="Bold"/> <Grid Margin="8" Grid.Row="3"> <Grid.ColumnDefinitions> <ColumnDefinition Width="120" /> <ColumnDefinition Width="*"/> <ColumnDefinition Width="120" /> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <TextBlock Margin="8" Text="RangeBegin" VerticalAlignment="Center" HorizontalAlignment="Right"/> <TextBlock Margin="8" Grid.Row="1" TextWrapping="Wrap" Text="{Binding RangeBegin, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type Window}} }" VerticalAlignment="Center" Grid.Column="1" Foreground="Black" Background="White" /> <TextBlock Margin="8" Text="RangeEnd" VerticalAlignment="Center" Grid.Column="2" HorizontalAlignment="Right" /> <TextBlock Margin="8" Grid.Row="1" TextWrapping="Wrap" Text="{Binding RangeEnd, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type Window}} }" VerticalAlignment="Center" Grid.Column="3" Foreground="Black" Background="White" /> </Grid> <TextBlock Margin="8,8,8,2" Grid.Row="4" Text="ControlBinding" VerticalAlignment="Bottom" FontSize="16" FontWeight="Bold"/> <Grid Margin="8" Grid.Row="5"> <Grid.ColumnDefinitions> <ColumnDefinition Width="120" /> <ColumnDefinition Width="*"/> <ColumnDefinition Width="120" /> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <TextBlock Margin="8" Text="SelectionStart" VerticalAlignment="Center" HorizontalAlignment="Right"/> <TextBlock Margin="8" Text="{Binding SelectionStart, ElementName=radSlider}" VerticalAlignment="Center" Grid.Column="1" Background="White" Foreground="Black" /> <TextBlock Margin="8" Text="SelectionEnd" VerticalAlignment="Center" Grid.Column="2" HorizontalAlignment="Right"/> <TextBlock Margin="8" Text="{Binding SelectionEnd, ElementName=radSlider}" VerticalAlignment="Center" Grid.Column="3" Background="White" Foreground="Black" /> </Grid> </Grid></Window>
[CS]
using System.Windows;namespace RadSliderTest{ public partial class MainWindow : Window { #region [RangeBegin] DependencyProperty public double RangeBegin { get { return (double)GetValue(RangeBeginProperty); } set { SetValue(RangeBeginProperty, value); } } public static readonly DependencyProperty RangeBeginProperty = DependencyProperty.Register("RangeBegin", typeof(double), typeof(MainWindow), new PropertyMetadata(0.0)); #endregion #region [RangeEnd] DependencyProperty public double RangeEnd { get { return (double)GetValue(RangeEndProperty); } set { SetValue(RangeEndProperty, value); } } public static readonly DependencyProperty RangeEndProperty = DependencyProperty.Register("RangeEnd", typeof(double), typeof(MainWindow), new PropertyMetadata(1.0)); #endregion public MainWindow() { InitializeComponent(); } }}