1

I'm learning C#, and I'm making a WPF Application.

The trouble is:

I have tried, but I don't know how to make a simple image object be a slider.

I have an idea to get values, calculating by the position of image object. I only need help to move the object image by the mouse.

Can you help me?

Kennedy Souza
  • 164
  • 1
  • 13

1 Answers1

2

This is probably not the answer that you wanted, but it is the answer. You need to declare a custom ControlTemplate for the Slider control. This is no task for a new developer really, but there is some help at hand. First, I recommend that you read through the WPF Control Templates - An Overview page on MSDN for some background to this task.

Next, if you're not put off by that read, you can find the default ControlTemplate for the Slider in the Slider Styles and Templates page on MSDN. It's always best to start with the default ControlTemplate and to get that working before you make any changes to it. From there, you should just make small changes and run your project regularly to ensure that your changes are what you wanted. You'll get there in the end.

Sheridan
  • 68,826
  • 24
  • 143
  • 183