Gjallarhorn.Bindable
Gjallarhorn.Bindable copied to clipboard
Internal "-Errors" and "-IsValid" properties use dashes that invalid as property path in Avalonia
Functions getErrorsPropertyName
and getValidPropertyName
provides PropertyName that invalid in Avalonia:
let getErrorsPropertyName propertyName =
propertyName + "-" + "Errors"
let getValidPropertyName propertyName =
propertyName + "-" + "IsValid"
So, attempt to use them on Avalonia as for WPF will fail.
Even if Avalonia allow use dashes someday (rather not, I think) it's a problem now. I see only three options yet:
- To document it somewhere (something like list of features that unavailable in Avalonia or other platforms)
- To provide other implementation for these functions for Avalonia.
- To change implementation of these functions the way that names have been supported on all platforms.
Might be worth bringing up on Avalonia to see if they want to allow it first.
The problem with "fixing" this on our end is there is no possible way to fix it that wouldn't potentially cause conflicts with user-defined properties, as the fix would mean not using "unrepresentable names". This is a common thing done by compilers/etc, as it allows differentiation without conflict from user code. If Avalonia would support it (which is probably more of a matter of explicitly not checking for it, would be my guess), it'd be better for everybody in the long run.
I've created issue there at first - link just below code in description. Probably I had to do it more clearly.
This issue I created in trying to find at least temporary solution until Avalonia made the final decision.