xamarin/Xamarin.Forms

Shouldn't be able to reference sub-namespaces with Xaml

オープン

#5,704 opened on 2019/03/27

 (2 件のコメント) (0 件のリアクション) (1 人の担当者)C# (1,926 件のフォーク)batch import
a/Xaml </>e/3 :clock3:help wantedin-progressinactivet/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Description

(from @TimBarham): Consider an app that has an Buttons namespace, and a Buttons.Flat namespace. There's a RoundedFlatButton type in the Buttons.Flat namespace, but it is referenced in XAML as if it was in the Buttons namespace:

<ContentPage ... xmlns:buttons="clr-namespace:Buttons">
    ...
    <buttons:Flat.RoundedFlatButton Text="A Button" />
    ...
</ContentPage>

That element is referring to the RoundedFlatButton type in the Buttons.Flat namespace. But such a usage is not valid XAML. Forms seems to handle this fine, but it should be interpreted as a property element, not an object element (only property elements can contain a period). Our intellisense (and the XET XAML parser) reject this (the specific error is that there is no RoundedFlatButton attached property found on type Flat).

Steps to Reproduce

Expected Behavior

Actual Behavior

Basic Information

  • Version with issue:
  • Last known good version:
  • IDE:
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP:
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices:

Screenshots

Reproduction Link

コントリビューターガイド