Stopping Needle at Scale Min

4 posts, 0 answers
  1. Mike
    Mike avatar
    28 posts
    Member since:
    Apr 2013

    Posted 01 Dec 2013 Link to this post

    I have a gauge that has a smaller Min and Max than the allowed values for my needle binding. For instance I have my Min set to 20 and my Max set to 80. The valid range is actually 0-100. 

    The needle therefore goes outside of the gauge. Other than putting a valueconverter on the needle value to stop this behaviour is there any built in way I've missed to limit the needle?

    Note: The bound property is used elsewhere, where the actual upper and lower limits are valid, so I can't limit it in the class. The only other way I could think of is to create a separate property that does the limiting in the class and then bind to that instead, which I guess would be better performing than a converter.

    Thanks...
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 03 Dec 2013 Link to this post

    Hi Mike,

    The RadGauge doesn't limit the indicator's (needle's) value in any way. This is wh6y you need to implement this functionality in your data model. Both approaches you described seem good.

    Regards,
    Andrey Murzov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.

    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.

    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Mike
    Mike avatar
    28 posts
    Member since:
    Apr 2013

    Posted 06 Dec 2013 Link to this post

    For performance reasons is there a preferred approach?

    I would have expected the converter would be more intensive than a new property with the limiting behaviour.

    Thanks, Mike...
  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 11 Dec 2013 Link to this post

    Hello Mike,



    At the first glance the new property could be faster. But if you want to know it for sure then you can use JustTrace and profile performance of your application.



    Regards,

    Andrey Murzov

    Telerik

    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.

    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.

    Sign up for Free application insights >>
Back to Top