Okay, so I know there are a few answers to this question online in other places, but I'm not satisfied with them.
I'm trying to do something that seems simple enough, I want to add text to the System.Windows.Controls.Pr
I know I can add a TextBlock on top of the ProgressBar for a quick fix, but I want this to be reusable (I use it on almost every form).
I've also created a UserControl the holds a ProgressBar with a TextBlock on top, but I'm then forced to reference every property like this:
ProgressBarWithText.InnerProgressBar.Value = 2
ProgressBarWithText.InnterTextBlock.Text = "Some Text Here"
I want to be able to access the properties of the ProgressBar as I normally would, with just the addition of a ProgressBar.Text property so that I can add text to it. I thought I should be able to do it by inheriting like so:
Public Class ProgressBarWithText
I added a DependencyProperty for "Text", but I don't know how to go about adding it to the control. I though about adding a TextBlock to the control, but I'm not sure how to do that. When I looked into it, I discovered I would probably have to modify the ControlTemplate to include a TextBlock and I have to clue how to do that.
I won't ask for a simple
way to accomplish this, but is there any way to do it at all? Whether I have to modify the ControlTemplate or not, I'd like to get this working.