The following two classes are given (F#)
type DynamicHelper() =
inherit DynamicObject()
...
override this.TryGetMember(binder: GetMemberBinder, result: obj byref) = ...
type IndexedHelper() =
...
member this.IndexedProperty with get(index: string) : float32 = ...
Instances of these classes are used in WPF ViewModel classes and in XAML binding.
<GridViewColumn Header="DynamicHelper" DisplayMemberBinding="{Binding DynamicHelperInstance.AProperty}" Width="Auto"/>
<GridViewColumn Header="IndexedProperty" DisplayMemberBinding="{Binding IndexedHelperInstance.IndexedProperty[anIndex]}" Width="Auto"/>
The code compiles and runs fine, however the XAML designed in Visual Studio 2022 gives the following Intellisense Errors for the two bindings
Error XLS0432 The property 'AProperty' was not found in type 'DynamicHelper'.
Error XLS0521 Type 'Single?' is not a collection.
How can I avoid or suppress these binding errors in the XAML designer?