Silverlight delegate question

Silverlight delegate question

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


greengumby posted on Monday, August 16, 2010

Hi,

I have a Parent-Child where I want the child to have a reference to a delegate on the parent. ie CanWriteProperty().  Basically I need the parent to decide whether the child is editable. 

This is ok by passing a reference from the parent to the child during Create/Fetch however as this is built up on the .server, what will happen when it gets passed to the Silverlight application from WCF.

My initial thoughts are that I would have to have a managed property to hold that delegate or alternatively on the client I would have to recurse the structure re-creating the link. 

Does anyone have any thoughts/suggestions on a better approach.

Thanks

Jeremy

ajj3085 replied on Monday, August 16, 2010

Why not just have a property on the parent which the child can query in its CanWriteProperty override?

greengumby replied on Monday, August 16, 2010

Ah I should have mentioned.

Parent - Child - GrandChild.... (each determining its editable status via root node)

Plus I'm trying to achieve loose coupling between my objects

The property on the parent will be my fallback :)

Thanks
Jeremy 

Copyright (c) Marimer LLC