문제

From the docs, it looks like I can only use a TypeConverter on classes that I create. Is that true, or is it possible to create a TypeConverter to use on existing framework types? Specifically, I'd like to convert a boolean value of true to a BlurEffect and a value of false to null.

The idea is to bind the Effect property on my view to a boolean property on my ViewModel and have the view blur when the value is true.

도움이 되었습니까?

해결책

You do not need to register a TypeConverter for converting types in a Binding.

Instead you can set the Binding.Converter property to an object that implements IValueConverter.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top