WPF DataGrid row click command

The Windows Presentation Foundation DataGrid control offers a huge possibilities regarding displaying tabular data. However one functionality I was always missing in data grid was the possibility to fire a command when user clicks a row.

By Mirek on (tags: DataGrid, mvvm, WPF, categories: code)

Pivot grid in WPF

Today I am going to show you how easy to achieve a pivot scrolling in wpf using scroll viewers and scroll bars.

By Mirek on (tags: pivot grid, WPF, categories: code)

Movable rows in WPF DataGrid

DataGrid control in WPF is a rich table structured control, which is perfect for displaying any kind of data in table like format. The one think about DataGrid it always lack, is a possibility to easily change the order of rows. It is not even about drag and drop of rows and items from and into the DataGrid , but simply rearrange existing rows in DataGrid control. It this post I will present you my solution for this problem, which additionally sticks to MvvM pattern perfectly.

By Mirek on (tags: Attached property, DataGrid, WPF, categories: code)

WPF CollectionView can leak memory

A time ago I wrote about using collection views in WPF to achieve different looks at the same source collection. By creating different instances of ListCollectionView we could have the collection displayed in different sorting, ordering and grouping shape. Unfortunately there is small trap when using collection views.

By Mirek on (tags: CollectionView, memory leak, WPF, categories: code)

Restyle your window

Until recently, creating a custom window style in Windows Presentation Foundation was quite a challenging task. You had to implement the window’s behavior from scratch. Resizing, moving and all other typically window related functionality had to be reinvented and reimplemented just because you wanted the window header bar to look different.

By Mirek on (tags: style, WindowChrome, WPF, categories: code)

WPF– visual states in MvvM

WPF has many rich features which facilitates making a great look&feel of the application. Unfortunately many of those features are cumbersome to implement and use when we develop in a Model - View – ViewModel architecture. In this post I will try to make you more familiar with visual states and how can we use them in our MvvM application.

By Mirek on (tags: behaviors, Expression Blend, Visual state, WPF, categories: code)