My knowledge of XAML relative to C# is limited, and trying to find, if possible, a more concise/efficient version of a binding/conversion expression.
... RightValue="{Binding Converter={StaticResource ListViewSingleSelectionMode}}"
The above is part of a conditional action XAML code based on Interaction Behavior for UWP. The code works as expected but my question is if the code can be confined to XAML without making a trip to a converter in code-behind.
All I wanted to do with the Converter is to return a ListView SelectionMode enumeration type: ListViewSelectionMode.Single and that is exactly what the IValueConverter based code-behind does with a single-liner return as:
return ListViewSelectionMode.Single;
Yes, you may have guessed it, the missing part with LeftValue= is bound to a ListView Control, and the RightValue shown above is to compare if the ListView SelectionMode is equal to ListViewSelectionMode.Single to implement a conditional action. Note that x:Static doesn't work for UWP as indicated under comments below.
Can "{Binding Converter={StaticResource ListViewSingleSelectionMode}}"
equivalently be represented in XAML without making a round-trip to the code-behind converter (noting that it should be an enum ListViewSelectionMode.Single)?