Fix gradient foreground on Wasm
GitHub Issue (If applicable): closes #7206
PR Type
What kind of change does this PR introduce?
- Bugfix
What is the current behavior?

What is the new behavior?

NOTE: Run behavior is still incorrect.
PR Checklist
Please check if your PR fulfills the following requirements:
- [ ] Docs have been added/updated which fit documentation template (for bug fixes / features)
- [ ] Unit Tests and/or UI Tests for the changes have been added (for bug fixes / features) (if applicable)
- [ ] Validated PR
Screenshots Compare Test Runresults. - [ ] Contains NO breaking changes
- [ ] Associated with an issue (GitHub or internal) and uses the automatic close keywords.
- [ ] Commits must be following the Conventional Commits specification.
Other information
Internal Issue (If applicable):
Supporting runs as in UWP seems to be tricky to me. I think it's not an important scenario right now. @carldebilly Let me know if it's worth opening an issue for it or just ignore it for now?
The added test is likely to fail on other platforms. It may get fixed with https://github.com/unoplatform/uno/pull/7188. So I'm keeping as a draft until #7188 is merged
@Youssef1313 Is there something missing for this PR to go through?
@carldebilly #7188 Needs to go first for tests to pass.
@jeromelaban @MartinZikmund Looks like failures are unrelated to the change? Can you restart the failing checks please? Thanks!
/azp run
Azure Pipelines successfully started running 2 pipeline(s).
One failure looks related to the change. I'm going to fix that now.
@jeromelaban Can we try restarting the failing checks here? Thanks!
/azp run
Azure Pipelines successfully started running 2 pipeline(s).
@Youssef1313 I re-run only the failing ones, when it's done maybe you can double check after if there are still some issues left ;) (cc @jeromelaban)
I'm not sure our behavior for IsTextSelectionEnabled is correct in the first place. Will discuss with @MartinZikmund. Converting this PR to a draft until we conclude what should be done, and thanks @agneszitte-nventive for the reminder on this PR!
@carldebilly Can you take a look please? Thanks!
Let's check the screenshots differences first.
@jeromelaban Looks like it's not run, probably because some UI Tests failed? I'm not sure whether the failures are related, could you restart please? Thanks!
/azp run
Azure Pipelines successfully started running 2 pipeline(s).
@jeromelaban Looks like it's not run, probably because some UI Tests failed? I'm not sure whether the failures are related, could you restart please? Thanks!
I restarted the build @Youssef1313 ;)
~~The tests that are failing in CI are passing locally for me~~

~~Probably it's worth another restart?~~
Ops, sorry, was on different branch. Will re-test
Confirmed test failures happen locally. Will take a look to try understanding what's happening.


There is a small shift somewhere between the two images (I got one from passing CI on master and one from CI in this PR), though it's hard for me to tell whether this difference is acceptable or why it's even happening.
@carldebilly Is this something you could take a look at?
I guess I understand what's happening now.
There is an empty TextBlock below the one that reads "DESCRIPTION" which used to have a height, but it's now zero height. It looks like I no longer hit this code path for this case:
https://github.com/unoplatform/uno/blob/c54390605409206659b7d4e32331eebe12693ed6/src/Uno.UI/UI/Xaml/UIElement.TextHelper.wasm.cs#L18-L38
I hope it passes this time :)
@jeromelaban This is ready for review.