WPF editable ComboBox binding

Today (and most of my night) I’ve been stuck with trying to bind to an editable WPF combo box. It sounds stupid and it is, really. The scenario is this: You have an editable combo box to which you bind a list of view models. I specify a data template in order to...

DataTemplate based on type in WPF

WPF often provides you with an option to set an ItemTemplate or an ItemTemplateSelector when styling say lists or even content controls (ContentTemplate). This is useful although most would probably just define an implicit style by not giving it a key:...

Copy from WPF Datagrid

I´ve used the WPF builtin Datagrid for presenting data easily in like tooling applications and such. Problem is, sooner or later you´ll find yourself wanting to copy that darn data to excel or a mail. I´ve been struggling with this and found some quite poor ideas on...

Select on on TextBox Focus

For once I´ll ramble less and provide more 🙂 A simple class to help you make the WPF TextBox able to select the text when it gets focus. I´ve gotten tired of subclassing all the time so this is a neat little class that you can just attach to any TextBox-control. The...