WPF switch panel

The panel which switch its content depending on the value of boolean flag is the topic of this post. The WPF application I’ve recently coded was a MvvM application and had a number of editable fields. The fields were editable only in specific circumstances and when the proper flag IsEditionMode has been set to true on the ViewModel. For trivial cases I could use TextBox with Is…

By Mirek on (tags: custom controls, SwithPanel, WPF, categories: code)

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)