Top "Wpf" questions

Windows Presentation Foundation, or WPF, is a subsystem for rendering user interfaces in Windows-based applications.

How do I set a ViewModel on a window in XAML using DataContext property?

The question pretty much says it all. I have a window, and have tried to set the DataContext using the …

.net wpf xaml mvvm
How can I data bind a list of strings to a ListBox in WPF/WP7?

I am trying to bind a list of string values to a listbox so that their values are listed line …

c# .net wpf windows-phone-7 data-binding
How can I open Windows Explorer to a certain directory from within a WPF app?

In a WPF application, when a user clicks on a button I want to open the Windows explorer to a …

c# wpf windows-explorer
Formatting text in a TextBlock

How do I achieve formatting of a text inside a TextBlock control in my WPF application? e.g.: I would …

c# wpf wpf-controls
How do I sort an observable collection?

I have a following class : [DataContract] public class Pair<TKey, TValue> : INotifyPropertyChanged, IDisposable { public Pair(TKey key, TValue …

c# .net wpf sorting observablecollection
c# - approach for saving user settings in a WPF application?

What approach do you recommend for persisting user settings in a WPF windows (desktop) application? Note that the idea is …

c# .net wpf settings
ResourceDictionary in a separate assembly

I have resource dictionary files (MenuTemplate.xaml, ButtonTemplate.xaml, etc) that I want to use in multiple separate applications. I …

.net wpf xaml controltemplate resourcedictionary
How to bind RadioButtons to an enum?

I've got an enum like this: public enum MyLovelyEnum { FirstSelection, TheOtherSelection, YetAnotherOne }; I got a property in my DataContext: public …

wpf data-binding enums radio-button
Change color of Button when Mouse is over

I want to change the background color of a button when IsMouseOver == True <Button Command="{Binding ClickRectangleColorCommand}" Background="{Binding …

wpf xaml user-interface button mouseover
How to open a WPF Popup when another control is clicked, using XAML markup only?

I've got two controls, a TextBlock and a PopUp. When the user clicks (MouseDown) on the textblock, I want to …

wpf xaml popup eventtrigger