Shouldn't be able to reference sub-namespaces with Xaml
#5,704 opened on Mar 27, 2019
Repository metrics
- Stars
- (5,644 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
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: