158
votes
20answers
36k views
What is the correct way to create a single instance application?
Using C# and WPF under .net (rather than WindowsForms or console), what is the correct way to create an application that can only be run as a single instance? I know it has something to do with some ...
149
votes
8answers
134k views
WPF image resources
I come from a mostly web and a little bit Windows Forms background. For a new project, we will be using WPF. The WPF application will need 10 - 20 small icons and images for illustrative purposes. I ...
130
votes
10answers
82k views
How to get Color from Hex color code using .NET?
How can I get Color from a Hex color code(e.g. #FFDFD991)?
I am reading a file and getting Hex color code, I need to create the corresponding System.Windows.Media.Color instance for the Hex color ...
110
votes
17answers
50k views
WPF MVVM Newbie - how should the ViewModel close the form?
I'm trying to learn WPF and the MVVM problem, but have hit a snag.
This question is similar but not quite the same as this one (handling-dialogs-in-wpf-with-mvvm)...
I have a "Login" form ...
95
votes
20answers
125k views
Good examples of WPF applications [closed]
I just starting to learn Windows Presentation Foundation (WPF) and I am interested in seeing some great examples of WPF applications. These can either be applications written entirely for showcasing ...
86
votes
9answers
82k views
Load a WPF BitmapImage from a System.Drawing.Bitmap
I have an instance of a System.Drawing.Bitmap and would like to make it available to my WPF app in the form of a System.Windows.Media.Imaging.BitmapImage.
What would be the best approach for this?
78
votes
4answers
20k views
How can a Metro app in Windows 8 communicate with a backend desktop app on the same machine?
In a situation where you have the UI frontend built using the new Metro style of apps for windows 8, and would like it to communicate with a .NET application running on the desktop on the same local ...
76
votes
6answers
28k views
WPF global exception handler
sometimes, under not reproducible circumstances, my WPF application crashes without any message. The application simply close instantly.
Where is the best place to implement the global Try/Catch ...
76
votes
13answers
55k views
WPF chart controls
I am looking for a very simple WPF chart which should have a 2D graph and
and should have pan and zoom facilities .
75
votes
3answers
16k views
ItemsControl with horizontal orientation
Do you know any controls inherited from the ItemsControl that have horizontal orientation of items?
73
votes
4answers
27k views
Globally catch exceptions in a WPF application?
We are having a WPF application where parts of it may throw exceptions at runtime. I'd like to globally catch any unhandled exception and log them, but otherwise continue program execution as if ...
66
votes
4answers
48k views
Automatic vertical scroll bar in WPF TextBlock?
I have a TextBlock in WPF. I write many lines to it, far exceeding its vertical height. I expected a vertical scroll bar to appear automatically when that happens, but it didn't. I tried to look for a ...
66
votes
11answers
3k views
Why does appending to TextBox.Text during a loop take up more memory with each iteration?
Short Question
I have a loop that runs 180,000 times. At the end of each iteration it is supposed to append the results to a TextBox, which is updated real-time.
Using MyTextBox.Text += someValue is ...
62
votes
6answers
188k views
Binding WPF ComboBox to a Custom List
I have a ComboBox that doesn't seem to update the SelectedItem/SelectedValue.
The ComboBox ItemsSource is bound to a property on a ViewModel class that lists a bunch of RAS phonebook entries as a ...
62
votes
5answers
37k views
Is there a WPF message box?
Is there a standard message box in WPF I should use, like WinForms System.Windows.MessageBox.Show()?
...or is it OK to use the WinForm message box?