
How to run and interact with an async Task from a WPF gui
I have a WPF GUI, where I want to press a button to start a long task without freezing the window for the duration of the task. While the task is running I would like to get reports on progress, an...
wpf - The calling thread must be STA, because many UI …
Apr 23, 2018 · If you make the call from the main thread, you must add the STAThread attribute to the Main method, as stated in the previous answer. If you use a separate thread, it needs to …
WPF: Setting the Width (and Height) as a Percentage Value
Say I want a TextBlock to have its Width equal to it's Parent container's Width (ie, stretch from side to side) or a percentage of it's Parent Container Width, how can I accomplish this in …
windows - What exactly is WPF? - Stack Overflow
Sep 1, 2008 · WPF is the Windows Presentation Foundation. It is Microsoft's newest API for building applications with User Interfaces (UIs), working for both standalone and web-based …
How to get controls in WPF to fill available space?
Aug 30, 2008 · 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, like the ones I …
WPF - Adopt size of parent - Stack Overflow
May 12, 2016 · WPF - Adopt size of parent Asked 13 years, 5 months ago Modified 6 years, 5 months ago Viewed 52k times
How do I get a TextBox to only accept numeric input in WPF?
Add a preview text input event. Like so: <TextBox PreviewTextInput="PreviewTextInput" />. Then inside that set the e.Handled if the text isn't allowed. e.Handled = !IsTextAllowed(e.Text); I use …
c# - Example using Hyperlink in WPF - Stack Overflow
Apr 20, 2012 · Example using Hyperlink in WPF Asked 13 years, 6 months ago Modified 1 year, 11 months ago Viewed 256k times
c# - How to easily draw graphs in WPF? - Stack Overflow
@RachelGallen Could you tell me how to draw graphs of edge-connected vertices using Dynamic Data Display? The documentation is poor and I can't tell from the tutorials how to do this kind …
wpf - Binding to static property - Stack Overflow
Jan 7, 2015 · As of WPF 4.5 you can bind directly to static properties and have the binding automatically update when your property is changed. You do need to manually wire up a …