DeanC

Stories submitted by DeanC

Using CLR 4 Dynamics To Mock Bindable Objects in XAML(www.buttonchrome.com)

submitted by DeanCDeanC(15) 2 years, 3 months ago

When I’m building prototypes in WPF or working on a GUI spike in an agile development team I often find it really unproductive to continuously switch between working in XAML (with my designer hat on), and working on the plumbing code (with my C# hat on). Wouldn't it be nice to be able to model my data in XAML, and seamlessly use it with XAML Binding expressions that’ll be valid once the ‘real’ data gets plumbed in. Well, thanks to the dynamic features in CLR v4 this is now a trivial task. read more...

add a comment |category: |Views: 7

tags: another

Thread-Safe & Dispatcher-Safe Observable Collection for WPF(www.buttonchrome.com)

submitted by DeanCDeanC(15) 2 years, 3 months ago

A common problem in WPF (& Silverlight) development is when you are working with multiple threads that need to change a collection that is a binding source and implements INotifyCollectionChanged. Basically, the standard ObservableCollection<T> will only allow updates from the dispatcher thread, which means you need to write a lot of code for the worker threads to marshal changes onto the main message pump via the dispatcher. This can be a bit tedious, so I recently wrote a collection that performs all of the necessary marshalling internally, so users of this type do not have to be concerned about thread affinity issues. read more...

add a comment |category: |Views: 439

tags: another