code

Pivot grid in WPF

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

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

code

Movable rows in WPF DataGrid

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

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.

code

WPF CollectionView can leak memory

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

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.

code

Restyle your window

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

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.

code

WPF– visual states in MvvM

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

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.

code

One collection – many views

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

Let’s imagine we have a huge collection of some objects (may be our data objects) and we need to filter this collection and display only a part of its elements in different places in our WPF application. Instead of creating many different instances of sub collection we can use the benefits of collection views.