Wpf label content not updating
This is not the case for the Text Block control, where you will have to specify it manually.
In a simple case like this, where the content is simply a string, the Label will actually create a Text Block internally and show your string in that. Well, there are a few important differences between the Label and the Text Block.
So, I've decided to add a helper method to refresh a WPF control.
Afterwards, it will then execute the provided delegate (which is our empty method).
We use the Target property to connect the Label and the designated control.
We use a standard WPF binding for this, using the Element Name property, all of which we will describe later on in this tutorial.
Text Block controls doesn't support this functionality, but the Label does, so for control labels, the Label control is usually an excellent choice.
Let's look at an example of it in action: The screenshot shows our sample dialog as it looks when the Alt key is pressed.