Xamarin Forms introduces VSM, we will now try to extend the features of VSM to be more useful.
-
VSM should make easy to activate states from XAML, for this we could introduce the concept of a
StateTrigger
, a state trigger activates the attached state depending of a number conditions, we could have builtinAdaptiveTrigger
where we activate a state depending on features like screen size or orientation, or aEventStateTrigger
that could activate a state when a event is fired and deactivate when other event is fired. We already have this kind of concept and a existingEventTigger
andTriggerbase
.
That way the user doesn't have to call the GoToState on code behind. A StateTrigger should only apply when all conditions are met, if any of the conditions isn't met all the modifications to the properties made by the corresponding VisualState are automatically removed and the values provided initally take effect. -
VSM should support more out of the box states for each of the Views like Bu