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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:20:47+00:00 2026-06-17T18:20:47+00:00

I have a scroll that changes its value, and I want to write on

  • 0

I have a scroll that changes its value, and I want to write on a Label the value that is taking at every moment.

I have tried this:

<Window x:Class="WpfApplication16.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:my="clr-namespace:WpfApplication16"
    Title="Window1" Height="300" Width="300">
<Window.Resources>
    <my:ValueAngleConverter x:Key="valueAngleConverter"/>
    <my:ValueTextConverter x:Key="valueTextConverter"/>
</Window.Resources>
<Grid>
    <Slider Name="knob" SmallChange="1">
        <Slider.Template>
            <ControlTemplate>
                <Viewbox>
                    <Canvas Width="300" Height="300" Margin="5">
                        <Ellipse Fill="LightBlue" Width="300" Height="300" Canvas.Left="0" Canvas.Top="0" 
            Stroke="Black" StrokeThickness="10"
            MouseLeftButtonUp="Ellipse_MouseLeftButtonUp"
            MouseMove="Ellipse_MouseMove"/>
                        <Ellipse Fill="Black" Width="60" Height="60" Canvas.Left="120" Canvas.Top="120"/>
                        <Canvas>
                            <Line Stroke="Red" StrokeThickness="5" X1="150" Y1="30" X2="150" Y2="20"
            MouseLeftButtonUp="Ellipse_MouseLeftButtonUp" MouseLeftButtonDown="Ellipse_MouseLeftButtonDown"/>
                            <Canvas.RenderTransform>
                                <RotateTransform CenterX="150" CenterY="150">
                                    <RotateTransform.Angle>
                                        <MultiBinding Converter="{StaticResource valueAngleConverter}">
                                            <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Value"/>
                                            <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Minimum"/>
                                            <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Maximum"/>
                                        </MultiBinding>
                                    </RotateTransform.Angle>
                                </RotateTransform>
                            </Canvas.RenderTransform>
                        </Canvas>
                    </Canvas>
                </Viewbox>
            </ControlTemplate>
        </Slider.Template>
    </Slider>
    <Label Content="{Binding Value, ElementName=knob, UpdateSourceTrigger=PropertyChanged}" />
</Grid>

I have changed the appearance of the slider content to a elliptical slider (If anybody feels curious I can attach full code).

But my problem goes with my label. I want it to change when I change the scroll value. Right now it shows the first value, but stacks the scroll (I can’t scroll) and can’t change its value.

Any idea on what I’m doing wrong to bind the scroll value to label content?

  • 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-06-17T18:20:48+00:00Added an answer on June 17, 2026 at 6:20 pm

    The following code works. The difference I see is that in binding you have not declared Path=Value, but I don’t think this should matter.

    <StackPanel>
        <Slider Name="knob" SmallChange="1"/>        
        <Label Content="{Binding ElementName=knob, Path=Value, UpdateSourceTrigger=PropertyChanged}"/>
    </StackPanel>
    

    The Template should be checked at the point where the Value is bound.

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

Sidebar

Related Questions

i have a scroll view in my application and i want that when the
I want to have a small text box with a scroll bar that will
I have a JScrollpane which contains a scrollable client that changes its size dynamically
I have an incoming stream of messages, and want a window that allows the
I have a scroll viewer in my application that contains a canvas, in which
I have a scroll view with transparent background that covers most of the screen.
I have a page setup with a scroll bar that is set with a
I have a div (sub area of page with scroll bar) that has some
I have a page that has no vertical scroll, rather, everything is displayed horizontally.
I have an ownerdrawn ListView that smears when I scroll. It only affects the

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.