XAML compiler doesn't deal with leading whitespace properly
See original GitHub issueAvalonia (0.10.6 - I am currently stuck on this version so please let me know if it’s fixed in a later version):
<ToolTip.Tip>
<TextBlock>
Returns a Domino build given a:

- Build Number (e.g. 16.0.11217.10000)


Returns the last 2 Domino builds given a:

- Leave Blank for Daily Builds
</TextBlock>
</ToolTip.Tip>
Vanilla WPF:
<StackPanel.ToolTip>
<TextBlock>
Returns a Domino build given a:<LineBreak />
- Build Number (e.g. 16.0.11217.10000)<LineBreak /><LineBreak />
Returns the last 2 Domino builds given a:<LineBreak />
- Leave Blank for Daily Builds
</TextBlock>
</StackPanel.ToolTip>
Expected behavior:
I would expect the visual result in Avalonia to look the same as the vanilla WPF visual result, but the Avalonia version adds a bunch of space in front of every line after the first line (probably due to the spacing in the xaml file).
Desktop (please complete the following information):
- OS: Windows 10
- Version 0.10.6
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Can't explain leading whitespace in FlowDocument
1 Answer 1 · Fixes it for me. Though my XAML formatter doesn't like it and keeps trying to move the Run to...
Read more >Xaml editor introduces trailing whitespace on Edit. ...
This results in unneccessary lines of spaces/tabs being added to the file, which then have to be removed by hand. For comparison, Roslyn, ......
Read more >White-space processing in XAML
The language rules for XAML state that significant white space must be processed by a XAML processor implementation.
Read more >Whitespace: The Silent Killer
git has the decency to only complain new trailing whitespace. Whitespace in HTML/XML is a completeley different issue. The extra spaces in the ......
Read more >Fastest method to remove all whitespace from Strings in .NET
There are countless ways to trim all whitespace from a string, but which one is faster?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Works good to me. I have only a style for background. 0.10.7. I don’t remember if there was any bugs related in 0.10.6, can’t check rn.
Fixed in master https://github.com/kekekeks/XamlX/pull/43