Mar 12, 2011 at 11:52 AM
Edited Mar 12, 2011 at 12:28 PM
Better earlier than later, but want to keep everyone in the loop.
- I made some changes to help the namespaces conform better. This will break your namespace "using" statements because the plural Views/ViewModels has been changed to View/ViewModel to be in line between "Core" and "Framework."
- The assembly is now CLS compliant. The Initialize, Activate, and Deactivate methods no longer contain underscores, but they are also no longer public but protected as the public methods are exposed by the base interface.
- _Initialize -> InitializeVm
- _Activate -> ActivateView
- _Deactivate -> DeactivateView
- Because all of Jounce is now in one assembly, you may find an issue with dynamic modules reporting composition rejections where they weren't before. This is likely because your dynamic XAP references Jounce, which is fine, but you should click the properties
for Jounce and set "copy local" to "false" - this avoids loading the assembly multiple times
- You can now query the view model router interface for more information about views
- GetMetadataForView - gives the IExportViewAsMetadata for the view, so you can inspect category, menu name, is shell, etc.
- GetViewModelTagForView - just what it says, find the corresponding view model and then you can resolve that view model directly
- Fixed the naming issue in the quick starts for the dynamic calculator
- Add a payload of name value pairs to the navigation
- Pass the payload into the ActivateView method on the view model
- Extend the resolve view model to allow injection of the parameters
- Create helper extension methods to allow .AddNamedParameter("name", T Value) to the navigation args
- Create helper extension methods to allow .ParameterValue<T>("name") on the navigation args T
The examples for this have been added to "Simple Navigation" in the quick starts. The pertinent code to add parameters:
The pertinent code to extract a parameter to the type (will return default if parameter doesn't exist) - the example calls ToString because it is putting the guid contents in a text property:
Text = viewParameters.ParameterValue<Guid>("Guid").ToString();
All quickstarts have been updated. Please use this thread if you have questions or concerns.