xamarin/Xamarin.Forms

[Bug] Label.Text comments not allowed after the first non-whitespace character.

开放

#8,857 创建于 2019年12月11日

 (2 条评论) (0 个反应) (1 位负责人)C# (1,926 个派生)batch import
a/Xaml </>a/labele/4 :clock4:help wantedt/bug :bug:up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Description

<Label.Text> tag does not allow comments after the first non-whitespace character

Steps to Reproduce

  1. Clone repository here: https://github.com/jcummings2/LabelTextBug
  2. Try to build project

Alternately, you may also change any existing Label in a project to use the <Label.Text> tag like so:

<Label>
    <Label.Text>
Text can go here but you can't add a comment after it
<!-- Comment not allowed after first non-whitespace character -->
    </Label.Text>
</Label>

Expected Behavior

All comments should be ignored, regardless of where they occur.

Actual Behavior

XAML does not compile if there is a comment after the first non-whitespace character. The errors are:

  • On mac: Error: Specified cast is not valid.
  • On windows: Unable to cast object of type 'Xamarin.Forms.Xaml.ListNode' to type 'Xamarin.Forms.Xaml.IElementNode'.

Basic Information

  • Version with issue: 4.3.0.908675 (latest as of this writing)
  • Last known good version: ?
  • IDE: VS Pro for Mac 8.4 (Build 2535) and VS Pro for Windows 16.4.0
  • Platform Target Frameworks:
    • iOS: 8.0
    • Android: 9.0
  • Android Support Library Version: N/A
  • Nuget Packages: N/A
  • Affected Devices: N/A never gets that far

Screenshots

N/A

Reproduction Link

https://github.com/jcummings2/LabelTextBug/blob/master/LabelTextBug/MainPage.xaml#L6

贡献者指南