user1095239
user1095239

Reputation: 183

How to pass Parameters from a region to other regions

I need a suggestion how to pass Parameters(set of data which is selected) from region1 to region2 and region3 in same page Please refer to the screenshot below.

Screenshot

Thanks a lot in advance.

Upvotes: 0

Views: 720

Answers (2)

Sreedharlal B Naick
Sreedharlal B Naick

Reputation: 156

In case you are looking for some mechanism to pass data from one Viewmodel to another one, you can make use of either EventAggregator.

Read this: http://msdn.microsoft.com/en-us/library/ff921122(v=pandp.20).aspx

Or if you are looking for a simple mechanism, you can make use of Mediator pattern http://www.codeproject.com/Articles/35277/MVVM-Mediator-Pattern

Upvotes: 1

Rik van den Berg
Rik van den Berg

Reputation: 2839

I would suggest something like using x:Name and binding it to the element name. Small example.

<List x:Name="Data1">
<ContentControl regions:RegionManager.RegionName="Region2" DataContext="{Binding ElementName=Data1, Path=SelectedItem}" />
<ContentControl regions:RegionManager.RegionName="Region3" DataContext="{Binding ElementName=Data1, Path=SelectedItem}" />

Upvotes: 0

Related Questions