I have a TextBox and a Label. After clicking a button, I execute the following code: label1.Content = textbox1.Text; My question is, how do I enable text wrapping of...
I need to search a WPF control hierarchy for controls that match a given name or type. How can I do this? 20 Answers 20
How can I put some text into a TextBox which will be removed automatically when the user types something in it? 34 Answers 34 You can create a watermark...
I want the user to select a directory where a file that I will then generate will be saved. I know that in WPF I should use the OpenFileDialog...
What are differences between Visibility.Collapsed and Visibility.Hidden in WPF? 3 Answers 3
I’m considering either a ListBox or a ListView for a WPF application. It seems either supports data binding and item templates. My application has a simple list of items...
Some WPF controls (like the Button) seem to happily consume all the available space in its’ container if you don’t specify the height it is to have. And some,...
I’m trying to set a WPF image’s source in code. The image is embedded as a resource in the project. By looking at examples I’ve come up with the...
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question...
This question already has answers here: Globally catch exceptions in a WPF application? (6 answers) Closed 5 years ago. Sometimes, under not reproducible circumstances, my WPF application crashes without...