1

Just recently started WPF and well into the run before I can walk stage.

I have made a custom control that I need for one of my projects, and it looks almost exactly as I want. It currently looks like this:

Currently looks like

whereas I need to add a scale to the horizontal and vertical sides, with a mark and a number of how many cells we are at, skipping a predefined number which should look roughly like this:

Currently looks like

The model that provides the data for the control has the data, the size of each cell (and thus the overall size), all the label text, and a step value for the X and Y control.

The control is a grid with the title in the top row, the y title, space for the numbers, the control in the second row and the space for the X control in the next and the title of the x axis in the last.

If I was doing windows forms I would just draw in manually and it would be pretty simple, but I would like to learn this properly. After a lot of googling, I can't find a way of doing this easily in XAML, so I assume I have to do a custom control on a canvas, or is there an obvious way that my inexperience with WPF is missing?

Woody
  • 5,052
  • 2
  • 22
  • 28

1 Answers1

1

There is nothing out to the box but there is a control you can work off of to get what you need. Investigate modifying the TickBar.

An initial search turned up How to use string values in place of ticks on WPF Tickbar?.

Community
  • 1
  • 1
ΩmegaMan
  • 29,542
  • 12
  • 100
  • 122
  • Thanks for that - worth pursuing. I guess that is where our common language falls down again, I would have never thought to have called them ticks, I was just doing searches for scales and marks! – Woody Sep 27 '16 at 21:16