Problem with focus in RadNumericUpDown

3 posts, 0 answers
  1. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 22 Jan 2010 Link to this post

    When placed inside a scroll viewer the control does not receive focus properly. I've pasted some code with embedded instructions on how to replicate the bug:

    <UserControl x:Class="SilverlightApplication6.MainPage" 
        <Grid x:Name="LayoutRoot"
                    <TextBlock TextWrapping="Wrap" 
                               Text="Click the up/down buttons. The control never receives focus. Now click in the textbox part (to the left of the actual digits). The control loses focus immediately upon receiving it."></TextBlock> 
                    <telerikinput:RadNumericUpDown HorizontalAlignment="Left" 
            <TextBox x:Name="TxtTrace" 

    And c#:
    using System; 
    using System.Collections.Generic; 
    using System.Linq; 
    using System.Net; 
    using System.Windows; 
    using System.Windows.Controls; 
    using System.Windows.Documents; 
    using System.Windows.Input; 
    using System.Windows.Media; 
    using System.Windows.Media.Animation; 
    using System.Windows.Shapes; 
    using System.Windows.Controls.Primitives; 
    using System.Diagnostics; 
    using Telerik.Windows.Controls; 
    using System.Windows.Interactivity; 
    using System.Globalization; 
    namespace SilverlightApplication6 
        public partial class MainPage : UserControl 
            public MainPage() 
            private void RadNumericUpDown_GotFocus(object sender, RoutedEventArgs e) 
                TxtTrace.Text += "GotFocus" + Environment.NewLine; 
            private void RadNumericUpDown_LostFocus(object sender, RoutedEventArgs e) 
                TxtTrace.Text += "LostFocus" + Environment.NewLine; 
        public class NoDecimalDigits : Behavior<RadNumericUpDown> 
            protected override void OnAttached() 
                this.AssociatedObject.Loaded += AssociatedObject_Loaded; 
            protected override void OnDetaching() 
                this.AssociatedObject.Loaded -= AssociatedObject_Loaded; 
            void AssociatedObject_Loaded(object sender, RoutedEventArgs e) 
                var info = new NumberFormatInfo(); 
                info.NumberDecimalDigits = 0; 
                info.PercentDecimalDigits = 0; 
                AssociatedObject.NumberFormatInfo = info; 
                AssociatedObject.Loaded -= AssociatedObject_Loaded; 

  2. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 26 Jan 2010 Link to this post

    Follow-up: There was a similar problem in RadSlider, and that was solved only moments ago. There is more information in the support ticket (275153). I am pretty sure the two issues are related.
  3. Konstantina
    Konstantina avatar
    2332 posts

    Posted 29 Jan 2010 Link to this post


    Thank you for contacting us and sorry for the delayed response.

    We were able to reproduce the problem. We will do our best to fix the issue for the next internal build. Sorry for the inconvenience that this has caused you.

    If you have further questions please feel free to contact us again.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top