Wpf Design Time Data part 3
on November 30th, 2012
On category: WPF

Wpf Design Time Data – An introduction Wpf and Design data, Use a concrete class If you followed the suggestion of my first couple of posts you should have a dedicated Design Time view model for each real View Model in your application so you can effectively use Design Time Data. You should be aware [...]

Continue reading about Wpf Design Time Data part 3

Survive binding of DataGrid in WPF
on November 23rd, 2012
On category: WPF

DataGrid is one of the most annoying control in WPF because it sometimes has really different behaviors from other controls. The very first problem is that inside DataGridColumns the DataContext is not what you expect. Suppose you have this simple scenario in MVVM: an ObservableCollection of Objects, each one has IsSelected property and you want [...]

Continue reading about Survive binding of DataGrid in WPF

As you probably already know, you can access WPF controls only from a UI Thread and when I use MVVM each PropertyChanged message check for the need to execute on the UiThread to avoid cross-thread problems. Instead of using the Dispatcher in each property changed sometimes you can find code that does a little optimization [...]

Continue reading about SyncronizationContext.Current is not null, still not be able to access UI Controls in WPF

Wpf Design Time Data
on October 22nd, 2012
On category: WPF

A really cool aspect of WPF is the ability to use DesignTimeData, a feature that added with MVVM pattern gives a unique DesignTime capabilities to programmer and designers. To use Design Time Data you can simply add a new xaml file and use the Build Action DesignData as visible in Figure 1 Figure 1: A [...]

Continue reading about Wpf Design Time Data

Working with BrowserControl in .NET can be annoying, especially because it is a really complex control and it is a real browser inside your application. As an example one of the most common problem is how to prevent a page to open links in a new window. Lot of sites have anchor tags with attribute [...]

Continue reading about Browser control, prevent a link to open in a new page