Nathan Nesbit's Blog
Translate This Page
Translate this page
Browse by Tags
Nathan Nesbit's Blog
Tagged Content List
Detecting UI Thread Misuse
One of the challenges in building a UI application is correctly using the UI thread. This is a shared resource, and so any misuse has the potential to have global application effect. The most common form of misuse is using the UI thread for a long period of time. In severe cases this causes the application...
28 Dec 2010
WPF ICommandSource Implementations Leak Memory!
Actually the title of this article should be entitled “How to use WeakEventManager with ICommand implementations”, but the memory leak title is more exciting (and true) Overview Some WPF controls, such as Buttons, are command sources . A command source has 3 properties, Command, CommandParameter...
29 May 2009
Creating Attached Properties And Services
One cool thing about DependencyProperties is the ability to have AttachedDependencyProperties (or Attached Property for short). Regular properties are defined on a type and exist for instances of that type and sub-classes. An Attached Property is defined in one type, but can be applied to any instance...
27 May 2009
Performing Bulk Modifications To a Databound Collection
On a WinForms project in the past we were working on scalability and performance. One of the things we discovered was that individually invoking items to the UI thread was a bottleneck. The theory is that the each time one does a BeginInvoke it adds a message to the Message queue. This adds overhead...
27 May 2009
AddRange and ObservableCollection
The Issue Recently a friend asked a question about ObservableCollection. The question was how to do an “AddRange” method on it. The obvious answer is, of course, just write a method which iterates over the input collection and calls Add for each. But this really isn’t the answer, because the question...
20 Apr 2009
Developing Reusable Controls with the Model-View-ViewModel Pattern
There have been several great blogs and articles about the Model-View-ViewModel pattern lately. I thought I would share my own example and thoughts on it – specifically on using this pattern to develop reusable controls. Rather than re-explain what the Model-View-ViewModel pattern is I suggest you...
13 Mar 2009
Mouse vs Keyboard and ContextMenus
Recently I was asked to modify one of my controls so the user of the control could get the proper placement of thier context menus. My intial response was for them to use the placement properties on the ContextMenu/ContextMenuService to achieve the right positioning. Then the real issue came out....
2 Feb 2009
Creating Adorner content in XAML
I've been working on a problem of having a "popup" control in my project. For various reasons the Popup class isn't working for this scenario, because the scenario is outside the designed scope of Popup. So I've been looking at the AdornerLayer as a way to get a popup effect. One of the things I noticed...
5 Nov 2008
In my project we always deal with live data - that is data from the Data Model may change at any minute due to reasons like user interaction or an asynchronous change in what system the UI is modeling. For the most part we want the UI to update automatically in response to the changes. INotifyCollectionChanged...
3 Nov 2008
Page 1 of 1 (9 items)
© 2015 Microsoft Corporation.
Privacy & Cookies