Prism Drop 8 Breaking Changes

By admin on Dec 23 2008 | 0 Comments

The Prism team dropped another version of Prism last Friday at the usual spot: www.codeplex.com/compositewpf . This is Drop 8 of their product.

Breaking Change #1 - Cannot Find CompositeWpfEvent

However, there is not note of a breaking change in this drop that is not noted in the release notes.

The type "CompositeWpfEvent" has now been changed to "CompositePresentationEvent". I had to hunt around in reflector for a few minutes to find what they had they had changed it to. Update your composite events to inherit from that new class name and you'll be good to go.

Example:

Pre Drop 8:

public class CustomerAddedEvent : CompositeWpfEvent<Customer>
{

}

 

Post Drop 8:

public class CustomerAddedEvent : CompositePresentationEvent<Customer>
{

}

 

Breaking Change #2 = ModuleCatalog.Groups.Add Not Found

Here's what the previous code looks like:

var catalog = new ModuleCatalog();
catalog.Groups.Add(
	new ModuleInfoGroup {InitializationMode = InitializationMode.WhenAvailable}
		.AddModule(typeof(MyTestModule).FullName, typeof (MyTestModule)));
return catalog;

 

here's what it looks like now:

var catalog = new ModuleCatalog();
catalog.AddModule(typeof (MyTestModule), InitializationMode.WhenAvailable);
return catalog;
They changed the catalog so that the Modules and Groups return an Enumerable of the modules or groups. You cannot "Add" to an Enumerable return value. You can only get the enumerator on it and iterate through it (and then do some other stuff etc).

Post info

Tags:
Categories: Silverlight

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading