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 5953691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:51:44+00:00 2026-05-22T17:51:44+00:00

How can i move a progress bar value( i am simulating a car mph

  • 0

How can i move a progress bar value( i am simulating a car mph circular gauge using a progress bar) in accordance to a listbox value or combobox value? I am using a rectangle for the needle.

I can do it with a scroll bar( the value of the scrollbar makes the needle move) which is the code i will show. Instead of the value of the scroll bar i want to be able to have various speeds set in a listbox, combobox and when selected the progress bar / rectangle will move to that value.

Can this be done?

i will only show the code i think you need to see..
here is a pic of what i am talking about:

enter image description here

<Window.Resources>
<ControlTemplate x:Key="templateSpeedometer"
                     TargetType="ProgressBar">
    <ControlTemplate.Resources>
        <Style TargetType="Line">
        </Style>
    </ControlTemplate.Resources>


        <Canvas Width="0" Height="0" 
                    RenderTransform="1 0 0 1 0 50" Background="#FFF50D0D">

            <Rectangle Name="PART_Track" Width="180" />
            <Rectangle Fill="Black" Name="PART_Indicator" />



            <Polygon Points="5 2 5 -5 -75 0"
                         Stroke="Black" Fill="Gold">
                <Polygon.RenderTransform>
                    <RotateTransform 
                            Angle="{Binding ElementName=PART_Indicator, 
                                            Path=ActualWidth}" />
                </Polygon.RenderTransform>
            </Polygon>
        </Canvas>
    </Border>
</ControlTemplate>
</Window.Resources>

<Grid x:Name="LayoutRoot">

    <StackPanel>
        <Grid Height="216" Name="grid1" Width="612">
            <ScrollBar Name="scroll" Orientation="Horizontal" Minimum="0" Maximum="100" SmallChange="1" LargeChange="10" Margin="8,235,4,-36" />
            <Border Background="#FF5EB6D8"  CornerRadius="25" Height="247" VerticalAlignment="Top" Margin="13,5,27,0">

            <ProgressBar Background="#FFD6E1E5" Margin="4,8,0,112" Maximum="100" Minimum="0" Template="{StaticResource templateSpeedometer}" Value="{Binding ElementName=scroll, Path=Value}" BorderBrush="#FF5EB6D8" OpacityMask="White" HorizontalAlignment="Left" Width="281" BorderThickness="5,1,1,1" Orientation="Vertical"/>
            </Border>
  • 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-22T17:51:45+00:00Added an answer on May 22, 2026 at 5:51 pm

    Yes, this can be done. If you have a list of values displayed within a ListBox (or ComboBox), you can bind to the selected value via the SelectedItem property.

    For a potentially better overall design to your control, take a look at this blogpost:

    http://www.scottlogic.co.uk/blog/colin/2011/02/a-circular-progressbar-style-using-an-attached-viewmodel/

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

Sidebar

Related Questions

I used the following seek bar for displacing the progress of my audio. <SeekBar
I used to have my progress view controller in my current project. Then I
I need to dynamically move 2 seekbars. While the user moves one, the other
I have the following HTML in a page: <a href=javascript:void(0) class=move-next><img src=/Content/images/small-next-arrow.png height=16 width=16
Here is the thing, I want to create a simply app that copy many
I am trying to do something similar to this but in Android. In Android
I have a UITabBar Application with two views that load large amounts of data
I have a thread downloading data and I want to wait until the download
I'm trying to figure out what is the best general design for applications that
I am working on an app where i am doing some code in a

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.