Value Databinding

4 posts, 0 answers
  1. Josh
    Josh avatar
    17 posts
    Member since:
    Aug 2012

    Posted 10 Jun 2014 Link to this post

    Is there a way to only update the value data binding when the user has done a thumb up action?

    Thanks!
  2. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 13 Jun 2014 Link to this post

    Hi Josh,

    In order to update the Value of the slider only when the drag thumb is up you can set the IsDeferredDraggingEnabled property of the RadSlider to True. Please try this and let me know if it helps.

    Regards,
    Martin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Josh
    Josh avatar
    17 posts
    Member since:
    Aug 2012

    Posted 13 Jun 2014 in reply to Martin Link to this post

    Thanks! Is there anyway to turn off the value updates when the user clicks on the track bar or thumb? 
  5. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 17 Jun 2014 Link to this post

    Hi Josh,

    In order to achieve your requirement you can slightly change the ControlTemplate of the RadSlider. Basically you can do the following
    • Extract the ControlTemplate of the slider. You can see the Editing Control Templates help article to see how to do it.
    • Find the RepeatButton elements with x:Names set to "LargeIncreaseButton" and "LargeDecreaseButton", and set their IsHitTestVisible properties to False. Note that those elements represents the slider's track.
    • Find the Grid that holds the Thumb elements and also set its IsHitTestVisible to False.

    This will ensure that the track and the buttons cannot be clicked and the Value of the slider wont be updated. Please take a look at the attached project and let me know if this approach is helpful in your scenario. 

    Regards,
    Martin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top