You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Reunion 0.5.0, the TemplatePart attribute was defined correctly, however there looks to be a regression in 0.5.5.
See the below code blocks showing how the TemplatePartAttribute is missing attribute metadata in Reunion 0.5.5 compared to Reunion 0.5.0.
Reunion 0.5.5:
namespace Microsoft.UI.Xaml
{// Summary:// Represents an attribute that is applied to the class definition to identify the// types of the named parts that are used for templating.[WindowsRuntimeType("Microsoft.UI")]Noticeall metadata data missing
publicsealedclassTemplatePartAttribute:Attribute{publicstringName;publicTypeType;// Summary:// Initializes a new instance of the TemplatePartAttribute class.publicTemplatePartAttribute();}}
Reunion 0.5.0:
namespace Microsoft.UI.Xaml
{// Summary:// Represents an attribute that is applied to the class definition to identify the// types of the named parts that are used for templating.[AllowMultiple][AttributeUsage(AttributeTargets.Class, AllowMultiple =true)][ContractVersion(typeof(WinUIContract),65536)][WebHostHidden][WindowsRuntimeType("Microsoft.UI")]publicsealedclassTemplatePartAttribute:Attribute{publicstringName;publicTypeType;// Summary:// Initializes a new instance of the TemplatePartAttribute class.publicTemplatePartAttribute();}}
This code is failing to compile with error CS0579.
Severity
Code
Description
Project
File
Line
Suppression State
Error
CS0579
Duplicate 'TemplatePart' attribute
SpectrumComponents
*
60
N/A
[TemplatePart(Name = PartDialogButton1, Type = typeof(SpectrumButton))]
[TemplatePart(Name = PartDialogButton2, Type = typeof(SpectrumButton))]
[TemplatePart(Name = PartDialogButton3, Type = typeof(SpectrumButton))]
[TemplatePart(Name = PartDialogTitle, Type = typeof(ContentControl))]
[TemplatePart(Name = PartDialogIcon, Type = typeof(BitmapIcon))]
[TemplatePart(Name = PartDialogContent, Type = typeof(ContentPresenter))]
[TemplatePart(Name = PartDialogButtonPanel, Type = typeof(Grid))]
public sealed partial class SpectrumDialog : ContentDialog {}
The text was updated successfully, but these errors were encountered:
Did this only affect the TemplatePartAttribute class, or all attributes? Title seems to indicate them all, so it's not clear if the description is just an example.
Fixed in 0.5.6
In Reunion 0.5.0, the TemplatePart attribute was defined correctly, however there looks to be a regression in 0.5.5.
See the below code blocks showing how the TemplatePartAttribute is missing attribute metadata in Reunion 0.5.5 compared to Reunion 0.5.0.
Reunion 0.5.5:
Reunion 0.5.0:
This code is failing to compile with error CS0579.
[TemplatePart(Name = PartDialogButton1, Type = typeof(SpectrumButton))]
The text was updated successfully, but these errors were encountered: