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

  • Home
  • SEARCH
  • 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 6890659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:18:38+00:00 2026-05-27T06:18:38+00:00

I have an integer constants to define minimum and maximum values of some integer

  • 0

I have an integer constants to define minimum and maximum values of some integer data, and i want to bind them to a Slider control properties like im doing on another numeric editor, but seems impossible.

Is there any easy way to acomplish this? Maybe with value converters, or Im missing something?

A bit of example code:

public const Int32 EXAMPLE_MIN_VALUE = 23;
public const Int32 EXAMPLE_MAX_VALUE = 55;

This works ok, im using an integer editor of WpfToolkit:

<WpfToolkit:IntegerUpDown Value="{Binding ExampleValue}" 
    Minimum="{x:Static Model:Configuracion.EXAMPLE_MIN_VALUE}" 
    Maximum="{x:Static Model:Configuracion.EXAMPLE_MAX_VALUE}" />

But when I try the same with Slider, it crash:

<Slider Value="{Binding ExampleValue}" 
    Minimum="{x:Static Model:Configuracion.EXAMPLE_MIN_VALUE}" 
    Maximum="{x:Static Model:Configuracion.EXAMPLE_MAX_VALUE}" />
  • 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-27T06:18:39+00:00Added an answer on May 27, 2026 at 6:18 am

    If you use x:Static directly that has no room for type conversion and thus causes an exception as you try to set an int on a double-property, but if you do this it works just fine:

    Minimum="{Binding Source={x:Static local:MainWindow.TestConstInt}}"
    

    That is because bindings apply type converters where necessary. And even if there were no suitable type converter you could just add a Binding.Converter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have some integer arithmetic which for historical reasons has to work the same
I have an integer column and I want to find numbers that start with
I have a bunch of constants declared like this: #define kConstant0 @Cow #define kConstant1
Python and Matlab quite often have integer date representations as follows: 733828.0 733829.0 733832.0
I have an integer field in a ClientDataSet and I need to compare to
I have an integer array in my Objective-C program. I'd like to sort it
I have four integer numbers a, b, c, d, and integer x ϵ [1,
I have the integer pixel I got from getRGB(x,y) , but I don't have
I have an integer variable ( time ) in one view controller whose value
Suppose that I have an integer variable in a class, and this variable may

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.