WPF Caching visual elements for better performance

More precisely how can we cache UI elements, since the property I’m going to describe is located at UIElement class, to improve the performance of the WPF control. Recently I had to implement a custom control in WPF. The goal was to display a list of some processes with steps in a Gantt chart. I decided the control will be based on a set of Grid panels where each cell indicates…

By Mirek on (tags: BitmapCache, CacheMode, custom controls, Gantt, WPF, categories: architecture)

dotPeek is out

Remember .net reflector?   That was a great and free tool, but then RedGate happened and they began to charge money for it. I mean don’t get me wrong, it’s still great, though, it’s not the same. Luckily jet brains recognized the ‘issue’ and after a year long (or something around that) beta period, they released the first version of dotPeek. It’s free, comfortable to use a…

By on (tags: None, categories: tools)

WYSIWYG, WYSIWYM and all that jazz

So you have a requirement – supply the possibility to create and edit rich formatted text in a web application. Seems pretty straightforward – use a ready editor and you’re done. Now, add some constraints to that, like – the editor needs to be dead simple because the target user does not care about all that semantic stuff (that’s your job), it needs to perform well and be as in…

By on (tags: editors, categories: web)

String concatenation and the myths that go with it

I’ve heard a lot of advice about how I should and how I should not concatenate strings. I’ve stuck to them, but the moment of questioning was inevitable. So I spun up a small app to see what’s what. If you’re interested, read along. There have always been moments when I wasn’t sure when to use the “+” operator and when not – in a majority of cases I didn’t cause I’ve always bee…

By on (tags: performance, categories: code)

Support for All()/Any() in WCF Data Services 5.0

9th of April 2012 the new version of WCF Data Services was released with number 5.0 and support for V3 OData protocol. You can download this version from here. You can read more about all new features added to this release of Data Services on WCF Data Services Team Blog Most important features are Vocabularies Actions Spatial types Named streams Patch support Any() All() suppor…

By Mirek on (tags: Data Services, OData, WCF, categories: code)

Practical differences between ASP.NET Web API and WCF Data Services

In this post I would like to point out the main practical differences between ASP.NET Web API and WCF Data Services (OData). For those who does not yet know too much about Web API there is a lot of articles and tutorial about this topic on the net. The starting point is of course Microsoft ASP.NET team site which provides all related information and a bunch of tutorials. Concer…

By Mirek on (tags: ASP.NET, OData, WCF Data Services, Web API, categories: infrastructure, code)

Expanding text area jQuery plugin

Here’s a handy little widget that may be of use. It’s based on this article, with some minor corrections. There’s one bug that I know of at the moment – under IE the text area doesn’t contract. The code is open and you can get it from here. Enjoy…

By on (tags: jQuery plugin, categories: code)

WPF MvvM - simple approach

Model View View-Model is one of most popular design pattern used in WPF applications. Thanks to binding, dependency properties and other features, WPF has been adjusted and, I believe,  somehow designed to be used with MvvM pattern easily. There are many MvvM frameworks for WPF which support creating loosely coupled and scalable wpf applications. We can use Prism, Cinch, M…

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

XAML styles in external assembly

Today I will show you how to use the XAML styles located in resource dictionary in external assembly. I will also try to point out the common problems that can raise during this process. We start with one project WPF application and the resource dictionary included in main window dictionary. and we want to extract the styles from section Window.Resources, place them in separate…

By Mirek on (tags: resources, styles, WPF, XAML, categories: architecture)

Customizing WPF combo box style

It this post we will try to create a custom combo box style which adjust the look of standard control to our needs. In general we will try to change this standard look of combobox and achieve something like this Great styling examples for combo box, buttons and tab items can be found on Codeplex, which I based my work on. If you are not familiar with styling in wpf there is a l…

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