This project is read-only.

<mui:Link /> With parameter to constructor.

Aug 12, 2013 at 9:51 AM
hello sir ,
i am bit new to mui: library .
I just want to know is it possible to pass object to next frame in <mui:Link />.

i have implemented FirstFloor.ModernUI.Windows.IContent.

Sorry, I am not good in english.

Let take example.

My user control is having parameterized constructor. and i want to send parameter to that constructor.
Can you tell in how to do that in <mui:Link />?
Sep 12, 2013 at 10:46 PM
did you find a solution yet? I have the same problem here. I have a list of players with ID's. This list is dynamic and they actually all link to the same details page, but with different ID's. Is it possible to do something like Source=/Pages/Details.xaml#id=1?
Sep 16, 2013 at 4:24 PM
i have an Ugly way to do that!
look at the LoremIpsumLoader for examle,you can define a dependency property in LoremIpsumLoader,may be a collection of parameters in the VM
then in the <mui:Link DisplayName="Lorem Ipsum 1" Source="/1#indentifier of parameter" />
thought indentifier of parameter,you can find the parameter,and protected override object LoadContent(Uri uri),you already have uri,
just use the NavigationHelper to get the fragment(indentifier of parameter)!
then you have the parameter to that constructor!
return new LoremIpsum(parameter);
Oct 1, 2013 at 7:15 AM
Thank you for your help. I had a quite similar solution, but still yours is a little nicer (even if I'm still not fully happy with it).