Skip to content

Add XML documentation to Controls.Xaml and enable CS1591#33669

Merged
jfversluis merged 2 commits intomainfrom
docs/xaml-api-docs-complete
Jan 22, 2026
Merged

Add XML documentation to Controls.Xaml and enable CS1591#33669
jfversluis merged 2 commits intomainfrom
docs/xaml-api-docs-complete

Conversation

@jfversluis
Copy link
Member

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description

Adds XML documentation to all public members in Microsoft.Maui.Controls.Xaml and enables CS1591 as a warning-as-error to prevent future documentation gaps.

Changes

Markup Extensions Documented

  • BindingExtension - All 11 properties
  • StaticResourceExtension - Key property
  • DynamicResourceExtension - Key property
  • OnPlatformExtension - All platform properties
  • OnIdiomExtension - All idiom properties
  • ReferenceExtension - Name property
  • TypeExtension - TypeName property
  • StaticExtension - Member property
  • NullExtension - Class summary
  • ArrayExtension - Type property and Items collection
  • TemplateBindingExtension - All binding properties
  • RelativeSourceExtension - Mode and AncestorType properties
  • DataTemplateExtension - TypeName property
  • AppThemeBindingExtension - Light/Dark/Default properties
  • StyleSheetExtension - Style and Source properties
  • FontImageExtension - Class summary (obsolete type)

Other Types Documented

  • Extensions class - LoadFromXaml methods
  • XamlFilePathAttribute - Constructor and FilePath property
  • AppHostBuilderExtensions.AddMauiControlsHandlers method

Build Configuration

  • Removed CS1591 from NoWarn
  • Added CS1591 to WarningsAsErrors

Stats

  • 20 files changed
  • +260 lines of documentation

- Add documentation to all XAML markup extensions
- Add docs to Extensions class and XamlFilePathAttribute
- Add docs to StyleSheetExtension and FontImageExtension
- Enable WarningsAsErrors for CS1591 to prevent gaps
Copilot AI review requested due to automatic review settings January 22, 2026 10:41
@jfversluis jfversluis added the area-docs Conceptual docs, API docs, Samples label Jan 22, 2026
@jfversluis jfversluis added this to the .NET 10.0 SR4 milestone Jan 22, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive XML documentation to all public members in the Microsoft.Maui.Controls.Xaml assembly and enables CS1591 (missing XML documentation warning) as an error to enforce documentation requirements going forward.

Changes:

  • Added XML documentation to 16 markup extension classes covering class summaries, properties, constructors, and parameters
  • Added XML documentation to the Extensions class (LoadFromXaml methods) and XamlFilePathAttribute
  • Added XML documentation to AppHostBuilderExtensions.AddMauiControlsHandlers method
  • Modified build configuration to treat CS1591 as an error instead of suppressing it

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Controls.Xaml.csproj Removed CS1591 from NoWarn and added to WarningsAsErrors to enforce documentation
XamlFilePathAttribute.cs Added class, constructor, and property documentation
ViewExtensions.cs Added class and method documentation for LoadFromXaml overloads
AppHostBuilderExtensions.cs Added method documentation for AddMauiControlsHandlers
BindingExtension.cs Added class and property documentation for all 11 public properties
StaticResourceExtension.cs Added class and property documentation for Key property
DynamicResourceExtension.cs Added class and property documentation for Key property
TypeExtension.cs Added class and property documentation for TypeName property
StaticExtension.cs Added class and property documentation for Member property
ReferenceExtension.cs Added class and property documentation for Name property
NullExtension.cs Added class summary documentation
ArrayExtension.cs Added class, constructor, and property documentation
DataTemplateExtension.cs Added class and property documentation for TypeName property
OnPlatformExtension.cs Added class and property documentation for all platform properties and converter properties
OnIdiomExtension.cs Added class and property documentation for all idiom properties and converter properties
RelativeSourceExtension.cs Added class and property documentation for Mode, AncestorLevel, and AncestorType
TemplateBindingExtension.cs Added class, constructor, and property documentation for all binding properties
AppThemeBindingExtension.cs Added class and property documentation for Default, Light, Dark, and Value properties
StyleSheetExtension.cs Added class and property documentation for Style and Source properties
FontImageExtension.cs Added class summary with obsolete note

<_MauiDesignDllBuild Condition=" '$(OS)' != 'Unix' ">True</_MauiDesignDllBuild>
<NoWarn>$(NoWarn);CA2200;CS1591;RS0041</NoWarn>
<NoWarn>$(NoWarn);CA2200;RS0041</NoWarn>
<WarningsAsErrors>$(WarningsAsErrors);CS1591</WarningsAsErrors>
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabling CS1591 as an error will require XML documentation on all public members, including the public ProvideValue methods in markup extensions (StaticResourceExtension, TypeExtension, ArrayExtension, DataTemplateExtension, NullExtension, OnPlatformExtension, OnIdiomExtension, ReferenceExtension, RelativeSourceExtension, and StaticExtension). These methods currently lack XML documentation and will cause compilation errors. Either add documentation to these methods or revert this change until they are documented.

Suggested change
<WarningsAsErrors>$(WarningsAsErrors);CS1591</WarningsAsErrors>
<WarningsAsErrors>$(WarningsAsErrors)</WarningsAsErrors>

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jfversluis jfversluis merged commit ab4de0e into main Jan 22, 2026
25 of 28 checks passed
@jfversluis jfversluis deleted the docs/xaml-api-docs-complete branch January 22, 2026 16:04
@github-actions github-actions bot locked and limited conversation to collaborators Feb 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-docs Conceptual docs, API docs, Samples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants