Silverlight - Working with multiple root objects

Silverlight - Working with multiple root objects

Old forum URL: forums.lhotka.net/forums/t/6569.aspx


mhnyborg posted on Friday, March 06, 2009

How can I bind the same save,delete and cancel buttons to 2 or more dataproviders?

I have a form where I edit to different root objects. I would very much like to bind the action buttons to both providers.

Is this possible?

RockfordLhotka replied on Friday, March 06, 2009

So the Save button saves both objects?

You'll need to have an intermediate control in your XAML that can be called by InvokeMethod, and that intermediate control will need to invoke the two data provider controls.

This intermediate control doesn't exist - you'll need to create it - but that's not terribly hard. My experience with both WPF and SL is that you need to create many little UI helper controls like this, so it isn't an uncommon thing, and is something worth learning to do.

Copyright (c) Marimer LLC