Simply,
I am trying to define a Converter than returns True when the input value is superior to 1. For that I am using the CompareConverter from CommunityToolkit like so:
<mct:CompareConverter
x:Key="GreaterThanOneConverter"
ComparisonOperator="Greater"
TrueObject="True"
FalseObject="False">
<mct:CompareConverter.ComparingValue>
<x:Int32>1</x:Int32>
</mct:CompareConverter.ComparingValue>
</mct:CompareConverter>
The issue is that this wont compile:
"No property, BindableProperty, or event found for "ComparingValue", or mismatching type between value and property"
-> What is the syntax to define an integer whose value is 1 in XAML ?
Note: I have been able to do it by defining the integer as a static resource and then referencing it but it feels tedious and so I was wondering if there was another way.
This is an issue on GitHub, [BUG] CompareConverter - No property, BindableProperty, or event found for "ComparingValue", or mismatching type between value and property. You could try the way in official document, Using the CompareConverter.
Now here is the related Pull request to improve the usage experience with CompareConverter in XAML and it has been merged. It's recommended that you follow the progress of this issue on GitHub and get the latest updates.
Hope it helps!