Fix animation behavior hot reload #2288
Open
+17
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
Fix https://developercommunity.visualstudio.com/t/Hot-reload-stops-working-when-using-Comm/10707756
This is a follow up to an earlier attempt to fix this issue with #2174, which we decided not to take.
See that PR for more context. Here's the update since then:
Ideally, this would be fixed on the MAUI tooling side, making the VS Hot Reload code respect the
special rules around readonly
OneWayToSource
properties (which aren't supported in WPF butare in MAUI). Evgeny and I discussed fixing there & started to scope, but we ran out of time to
get a fix in for VS 17.12 before it froze (and before we both went on vacation). I'm not sure
we'll be able to get a fix in for 17.13 either.
Given all that, it seems best to go back to applying this workaround on the CommunityToolkit side
to make Hot Reload work - with a public setter, it works. Updating the CommunityToolkit
also has the advantage that it works in all VS versions, including older ones.
I added a comment to the code to make it clearer that apps shouldn't use the setter directly, instead supplying a binding - the setter is only needed as a workaround for Hot Reload. @bijington - please review text of that comment.
Also, earlier we thought that making the setter
internal
may work, with anInternalsVisibleTo
. But Evgeny clarified thatSo
internal
in a no go & public with comment seems like the best option to get this working with XAML Hot Reload.Linked Issues
PR Checklist
approved
(bug) orChampioned
(feature/proposal)main
at time of PRAdditional information