dotnet / dotnet/maui

[Enhancement] Hot Reload: support for modifying sealable objects like Condition and TriggerBase

Open
#623 3 comments 0 reactions 0 assignees View on GitHub
area-xaml p/3 partner partner/hot-reload-xaml partner/ui-tools proposal/open t/enhancement ☀️
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 10h
Merged PRs (30d)
297

Description

Consider following XAML;
```








```

If user changes Value="True" to "False" then entire trigger needs to be rebuilt to avoid InvalidOperationException("Cannot change ... once the Trigger has been applied."). At the same time we can still add/remove Setters but elements do not get refreshed.
Other "sealable" objects cannot be checked for "is sealed" via public API, e.g. Condition.IsSealed is an internal property.

Thus we would like to see following improvements
1. API to modify sealable objects after they have been sealed, e.g. Xamarin.Forms.HotReloadHelper.ModifyProperty(object target, PropertyInfo property, object value).
2. API to refresh elements after sealable object modified, e.g. Xamarin.Forms.HotReloadHelper.RefreshAffectedElements(object sealable).
3. Better type annotation for sealable objects. By analyzing XAML in devenv.exe we should understand what objects are sealable and thus 1) and 2) API should be used.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.