question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

XAML compiler doesn't deal with leading whitespace properly

See original GitHub issue

Avalonia (0.10.6 - I am currently stuck on this version so please let me know if it’s fixed in a later version): image

<ToolTip.Tip>
  <TextBlock>
    Returns a Domino build given a:&#x0a;
    - Build Number (e.g. 16.0.11217.10000)&#x0a;&#x0a;
    Returns the last 2 Domino builds given a:&#x0a;
    - Leave Blank for Daily Builds
  </TextBlock>
</ToolTip.Tip>

Vanilla WPF: image

<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:closed
  • Created 2 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
maxkatz6commented, Oct 20, 2021

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.

Screen Shot 2021-10-20 at 3 21 52 PM

0reactions
maxkatz6commented, Jun 17, 2022
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found