Month: August 2010

Unit Testing the Setting of MediaElementState in Silverlight

I recently had the need to change the state of a MediaElement to coincide with other page functionality.  You can easily change the state of a MediaElement from the code-behind but you can’t unit test this.  At first I thought, it would be easy to just bind the CurrentState property to a ViewModel property but …

Unit Testing the Setting of MediaElementState in Silverlight Read More »

Cast between Different Interface Implementations

Just finished a cool extension method (at least I think it is), that converts any interface implementation to another implementation.  This can’t be done normally.  Only properties are copied over but you could copy anything that can be accessed via reflection.  I know someone somewhere has already done this but its so rewarding to have …

Cast between Different Interface Implementations Read More »