I have some template and use him in CollectionView
.
in MAUI it’s easy to change a root element property like BackgroundColor
using VisualState
. For child elements in the template it’s a hassle, you have to create properties and BindableProperty
in the template and bind them to the properties of the child element, which is not very convenient, but also not difficult.
But what should I do if I’m planning something a little more complex, like using FadeTo
or playing a sound? I want to use the Expand
and Collapse
methods in .xaml.cs
template.
The VisualStateManager
does not notify the VisualElement
that a style has been applied to it and does not have callbacks. The CollectionView
does not pass the VisualElement
that displays the data in its event. Obviously, developers don’t want to be able to know the selected state of a VisualElement
. Then how should this be implemented?