Monostate vs. Singleton: Adventures in WPF Databinding

by mheydt 13. April 2008 22:28 >
I ran across this good post today while searching on using objects represented as a MonoState or Singleton pattern in WPF databinding:

Monostate vs. Singleton : Adventures in WPF Databinding [The .NET Addict's Blog]

The gist of it is that objects represented as a MonoState may not work property with property update notifications.  This kind of makes sense as the UI will be bound not to the actual object, but the wrapper around the internal singleton.  Hence, property change notifications on the singleton may not make it up to the UI since they bubble up but there really isn't anywhere to go as they are not actually bound to a UI control.

So, the summary is be careful if you do this.

Blogged with the Flock Browser

Tags:

.Net | C# | Considered Dangerous | Patterns | WPF

blog comments powered by Disqus

about the author

I'm a .NET, XAML, and iOS polyglot that loves playing with new things and making cool and innovative stuff.  I am also a Mac junkie.

I am Principal Technologist for SunGard Global Services in NYC, in their Advanced Technologies practice, and I work extensively with SunGard's energy and financial customers.

Note the the posting on this blog are my own and do not represent the position, strategies or opinions of SGS.

twitter

I can't stop thinking big!
Sunday 1:08AM via WindowsLive
Just watched Moneyball. That's my pick for best movie this year.
Saturday 3:51PM via WindowsLive
@vincebelpiede: Report: Skype For Windows Phone Beta Imminent http://t.co/KYNjgg1L#mhtnd
Wednesday 8:39AM via Twitter for Mac
@mashable: Kinect Fusion Will Turn Gaming (and More) Into a 3D Fun House - http://t.co/Ihrq2fY2#mhtnd
Wednesday 8:39AM via Twitter for Mac
New Kinect SDK: http://t.co/57MvA5L5 #mhtnd
Wednesday 8:39AM via Twitter for Mac
Follow me on Twitter

recent comments

None

month list