You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.
Currently in our Picker implementation ItemDisplayBinding property has a string type, which represents property name which should be displayed, so if I have the following item type:
I can use ItemDisplayBinding="Name" so Picker would use this property for items.
But
a) It has no compile time validation
b) It's not flexible. What if I want to use multiple properties for display item or use custom function?
It should be Func instead (ItemDisplayBinding="i => i.Name").
We can use Maui's TypedBinding to convert Func to Binding to be able to assign it to Maui's control.
One thing I'm not sure about is naming. Does it make sense to rename it to smth like ItemDisplaySelector? Since it has no relation to Maui's Bindings? Or leave it as is?
The text was updated successfully, but these errors were encountered:
Currently in our Picker implementation
ItemDisplayBinding
property has a string type, which represents property name which should be displayed, so if I have the following item type:I can use
ItemDisplayBinding="Name"
so Picker would use this property for items.But
a) It has no compile time validation
b) It's not flexible. What if I want to use multiple properties for display item or use custom function?
It should be Func instead (
ItemDisplayBinding="i => i.Name"
).We can use Maui's
TypedBinding
to convert Func to Binding to be able to assign it to Maui's control.One thing I'm not sure about is naming. Does it make sense to rename it to smth like
ItemDisplaySelector
? Since it has no relation to Maui's Bindings? Or leave it as is?The text was updated successfully, but these errors were encountered: