EnumToBoolConverter - No property, BindableProperty, or event found for "TrueValues", or mismatching type between value and property. #759
-
I believe I followed the documentation correctly, but I'm getting an error:
The code:
What did I do wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
The issue here is that you are assigning a single value into the <toolkit:EnumToBoolConverter x:Key="inCountingMode">
<toolkit:EnumToBoolConverter.TrueValues>
<e:MeasurementPageMode>Counting</e:MeasurementPageMode>
<e:MeasurementPageMode>Counting</e:MeasurementPageMode>
</toolkit:EnumToBoolConverter.TrueValues>
</toolkit:EnumToBoolConverter> It's not ideal but the compiler will be able to convert that to the desired type. I believe can could create a list in XAML but it would be more verbose than this workaround. |
Beta Was this translation helpful? Give feedback.
-
Closed as answered |
Beta Was this translation helpful? Give feedback.
The issue here is that you are assigning a single value into the
TrueValues
property which cannot implicitly be converted to the underlying type ofIList
. To workaround that issue you can add a second value into theTrueValues
property as below:It's not ideal but the compiler will be able to convert that to the desired type. I believe can could create a list in XAML but it would be more ver…