Contents tagged with WPF
-
WPF Debugging Tools – XAML SPY
XAML SPY is debugging tool for WPF, similar to SNOOP but it also supports Silverlight and Windows Phone applications.
-
Focus management Tips & Tricks for nested ListView's part 1
Hi, as every WPF developer would agree with me that handling focus in WPF is a nightmare and every now and then you come across scenarios which makes you pull your hair I recently came across one(more) such scenario and it was a tough task to make focus work properly, I think it will be useful to blog about my experience and solutions I have implemented, so here is the first and easiest part of this series.
-
Finding last visual parent in VisualTree
Recently I had a requirement where I needed to find the last parent of a particular type in VisualTree. You can easily find an implementation to find the parent but was not able to find one for finding the top most parent of a given type. So I modified the current implementation to get the last parent of a given type in the hierarchy, which was not tough at all. This method is useful when you can have multiple parents of same type in hierarchy and you need to find the top most parent of type T, e.g. having multiple nested ScrollViewer’s. I will post the exact requirement I had and how this method was used to implement that in a later post.
-
Excel cell behavior for WPF TextBox
Excel cells have a very special and useful behavior that they become editable as soon as it gets selected but it doesn’t changes its visual appearance i.e. caret doesn’t becomes visible. User can start typing into it or use Enter or Arrow keys to move around, caret becomes visible as soon as user starts typing into it.
-
Resolving harmless binding errors in WPF II : 2 approaches for removing data binding errors due to heterogeneous types in a hierarchical view
This is a continuation post to my previous post Resolving harmless binding errors in WPF in which I talked about various ways of resolving different binding errors etc. I recently came across another situation in which we get these binding errors and how they can be resolved.
-
Making animations work for disabled controls
Problem -
-
Attached Behavior for auto scrolling containers while doing Drag & Drop
This is a very common problem in WPF, if you support Drag & Drop within your Items control or across the controls like ListView, TreeView etc. and your List contains hundreds of items then it’s very hard to drag an item at the bottom to the top. Various solutions are available on net for this -
-
Working on WPF application Memory Profiling
Today, I am going to start with the task of memory profiling the WPF application, on which I am working from past few months. I have successfully done this in past, fixing a lot of memory leaks and improving the performance of WPF applications; As in past, I am hopeful of fixing some very interesting bugs and improve the application performance.
-
WPF DataGrid Customization: Resizing Row/Column through DataGridCell gridlines
In this post I am going to share my experience on how I achieved the functionality to resize DataGrid row/column from any cell in that row (not just the row header). We needed this functionality as our user can hide the DataGrid headers and it is not possible to resize the rows/columns after that.
-
Importance of specifying AncestorType with x:Type in RelativeSourceBinding
I am really very happy right now, for the past 4 days me and my team were trying to solve a very trivial bug in our application and finally it got resolved by just adding x:Type in our RelativeSource bindings;Can you believe this, a production issue getting resolved just by this simple change, I couldn’t; so I tested this fix at least ten times to believe it