0
votes

I have a property on a Silverlight control that a ViewModel wants to bind to. The ViewModel need to told of changes to the property NOT the other way around

Syntax like

<MyControl ViewPort="{Binding VMProperty}"/>

Declares ViewPort as the Target, in this instance ViewPort is the source of the data. I know I could make it TwoWay binding but that just seems wrong when i simply want one way but in the other direction.

Besides I do not want to make the property on the control a DependencyProperty because I do not want that property settable and I do not beleive that Silverlight supports read only dependency properties.

Is there a different way of setting up the Binding?

TIA

Pat Long

1

1 Answers

0
votes

Maybe this works? http://forums.silverlight.net/forums/p/141042/315359.aspx#315359

{Binding ElementName=TextBox1, Path=Text, Mode=TwoWay ,UpdateSourceTrigger=Explicit}