Skip to content

EnumToBoolConverter - No property, BindableProperty, or event found for "TrueValues", or mismatching type between value and property. #759

Closed Answered by bijington
BioTurboNick asked this question in Q&A
Discussion options

You must be logged in to vote

The issue here is that you are assigning a single value into the TrueValues property which cannot implicitly be converted to the underlying type of IList. To workaround that issue you can add a second value into the TrueValues property as below:

<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 ver…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@danielancines
Comment options

@bijington
Comment options

@danielancines
Comment options

@BioTurboNick
Comment options

@bijington
Comment options

Answer selected by BioTurboNick
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants