質問

I'm implementing a Silverlight 5 application, using framework .NET 4.0. I need to use the OneWayToSource binding but unfortunately it doesn't appear in the propositions.

OneWayToSourceProblem

I tried to know if it was due to the framework or the silverlight version which seems not to be the case.

Do you have any piece of information that might help ?

役に立ちましたか?

解決

It is not available in Silverlight. You consulted the wrong page (full .Net).

[Edit] You can simulate it with a TwoWay-Binding and a ValueConverter that discards any input in its Convert method:

public class DiscardingConverter : IValueConverter
{
    public object Convert(...)
    {
        return DependencyProperty.UnsetValue;
    }
}

UnsetValue

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top