SebastianR
SebastianR

Reputation: 2233

Binding to a converter in UWP

I wonder if it is possible in UWP to bind to a converter like this:

{Binding Path=Value, Converter={Binding ElementName=control, Path=Converter, Mode=OneWay}, Mode=TwoWay}" 

I need this for a UserControl, on which the consumer can set the Converter property according to his needs. The binding expression above doesn't work for me, but I'm not sure if it is because I've done something wrong or if it is because the framework doesn't support it.

Upvotes: 0

Views: 981

Answers (1)

Romasz
Romasz

Reputation: 29792

Binding.Converter is regular property not a DependencyProperty thus binding won't work here. Like MSDN says:

A binding target. This is a DependencyProperty of the FrameworkElement in your UI that displays the data.

More information about Data Binding you will find at MSDN.

Upvotes: 2

Related Questions