Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6586905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:51:01+00:00 2026-05-25T16:51:01+00:00

I got a slider that on value change forces a fairly serious computation, so

  • 0

I got a slider that on value change forces a fairly serious computation, so I want to throttle it to fire actual event after for example 50ms pass when user has finished sliding it.

While I learned some various stuff about Rx its unclear how should I approach this using MVVM pattern.

In my current MVVM approach I got slider value bound to my viewModel. I would prefer to add Rx throttle with minimal possible impact on existing code (as a beginning at least).

Ive seen some other threads about MVVM and Rx and I don’t think they lead me to some exact direction with my problem. I see various possible approaches and would like not to invent a bycicle.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:51:02+00:00Added an answer on May 25, 2026 at 4:51 pm

    In this case, you should bind to the PropertyChanged event of your ViewModel, something like:

    Observable.FromEvent<PropertyChangedEventArgs>(x => this.PropertyChanged +=x, x => this.PropertyChanged -= x)
        .Where(x => x.PropertyName == "SliderName")
        .Select(_ => this.SliderName)
        .Throttle(TimeSpan.FromMilliseconds(50));
    

    Or, if you were using ReactiveUI, it’d look like this:

    this.WhenAnyValue(x => x.SliderName)
        .Throttle(TimeSpan.FromMilliseconds(50), RxApp.DeferredScheduler);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a form that I want different fields to appear when someone selects
I've got a div (#slider) that I'm using position: absolute; to allow it to
Got a bluescreen in windows while cloning a mercurial repository. After reboot, I now
Got a class that serializes into xml with XMLEncoder nicely with all the variables
Got some code that is not mine and its producing this warning atm: iehtmlwin.cpp(264)
I have a CALayer that I want to animate across the screen. I have
Heya, I've got some code that I think ought to be working (though I
How can I create a vertical slider with jQuery? Here's what I've got so
I've got a local store that has addresses in it. I view an address
I've got a script that I'm trying to modify so that I don't load

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.