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
I have items in a CollectionView that I wish to set the semantic description for (so Narrator doesn't say that every element is "Microsoft.Maui.Controls.Platform.ItemTemplateContext") but I can't work out how to bind the value when method only takes a string.
I'm sure this is obvious but I can't find any examples or work it out from the docs.
I need to set the SemanticDescription on the Border to get MAUI to expose the text correctly to the A11Y tooling.
Is there a simple way to get that bound value and pass it as a string to the method?
Or is there another way to do this entirely? (I looked at creating the Border separately and then trying to set the property, but I still don't see how to set the specific value for the instance in the ItemsSource of the CollectionView.)
Related: How to bind attached properties inside a DataTemplate that doesn't have custom extension methods as part of the library?
I'm also surprised there's not an easy way within a Template to be able to pass a bound item value to any extension method that accepts a string. Or have I missed that in the docs also?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have items in a CollectionView that I wish to set the semantic description for (so Narrator doesn't say that every element is "Microsoft.Maui.Controls.Platform.ItemTemplateContext") but I can't work out how to bind the value when method only takes a string.
I'm sure this is obvious but I can't find any examples or work it out from the docs.
Here's what I'm working from:
I need to set the SemanticDescription on the Border to get MAUI to expose the text correctly to the A11Y tooling.
Is there a simple way to get that bound value and pass it as a string to the method?
Or is there another way to do this entirely? (I looked at creating the Border separately and then trying to set the property, but I still don't see how to set the specific value for the instance in the ItemsSource of the CollectionView.)
Related: How to bind attached properties inside a DataTemplate that doesn't have custom extension methods as part of the library?
I'm also surprised there's not an easy way within a Template to be able to pass a bound item value to any extension method that accepts a string. Or have I missed that in the docs also?
Beta Was this translation helpful? Give feedback.
All reactions