One collection – many views

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. CollectionView is a wrapper around a collection that allows filterin…

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

REMs

REMs – the new hotness in css. They’ve been around for a while, but not very popular.  With the rising tide on responsive design, and mobile web usage, it looks like there may be more attention around this concept. Throw in a css pre-processor and using them becomes much easier. If you want to read up on the subject, here are 2 links that give you a short but thorough info…

By on (tags: css, categories: tools, web)

knockout cart

I recently had an opportunity to put some new knockout knowledge into use.  Tekpub has a very nice training video on the subject, which was a great starting point, so let me show you the result. First some quick requirements: Every product has a button that adds a fixed number of items (in my case 1) to the cart There is a separate cart page The cart has a possibility to c…

By on (tags: javascript, knockout, categories: code, web)

TabControl and selected tab index

It was obvious for me that a TabControl in WPF, which is a container for TabItems, has a dependency property indicating the index of current tab. I was, also obviously, not surprised when I found TabIndex property on the TabControl. So without unnecessary thinking and spending time on that, I have set a binding to this property in my application. I was hoping that by changing b…

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