Skip to content

Expose new XML namespace for internal types#4031

Open
Copilot wants to merge 2 commits intomasterfrom
copilot/expose-internal-xml-namespace
Open

Expose new XML namespace for internal types#4031
Copilot wants to merge 2 commits intomasterfrom
copilot/expose-internal-xml-namespace

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

Partially fixes #4029
Fixes #4030

Exposes a new XML namespace http://materialdesigninxaml.net/winfx/xaml/themes-internal (prefix: materialDesignInternal) to make public types from the .Internal sub-namespaces accessible in XAML.

Changes Made

  • src/MaterialDesignThemes.Wpf/Properties/AssemblyInfo.cs: Added XmlnsPrefix and XmlnsDefinition assembly attributes registering the new http://materialdesigninxaml.net/winfx/xaml/themes-internal namespace, covering:

    • MaterialDesignThemes.Wpf.Internal
    • MaterialDesignThemes.Wpf.Converters.Internal
    • MaterialDesignThemes.Wpf.Behaviors.Internal
  • README.md: Added an "XML Namespaces" subsection under "Getting started" documenting both XML namespaces, with a warning that types from the materialDesignInternal namespace are not guaranteed to maintain backwards-compatibility between versions, and a usage example.

Usage

To use the internal namespace in XAML, declare it as follows:

<Window ...
  xmlns:materialDesignInternal="http://materialdesigninxaml.net/winfx/xaml/themes-internal">

Note: Types exposed via materialDesignInternal are internal implementation details and are not guaranteed to maintain backwards-compatibility between versions.

@nicolaihenriksen
Copy link
Copy Markdown
Contributor

@copilot There really isn't a need for a runner for this work. Simply make the changes in the .cs file and update the documentation, then I can review the changes.

@nicolaihenriksen
Copy link
Copy Markdown
Contributor

@copilot please try again.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 31, 2026

@copilot please try again.

Done. Commit 28fbb4c makes the following changes directly to the files:

  1. src/MaterialDesignThemes.Wpf/Properties/AssemblyInfo.cs – Added XmlnsPrefix and XmlnsDefinition attributes registering the new http://materialdesigninxaml.net/winfx/xaml/themes-internal namespace (prefix: materialDesignInternal) covering MaterialDesignThemes.Wpf.Internal, MaterialDesignThemes.Wpf.Converters.Internal, and MaterialDesignThemes.Wpf.Behaviors.Internal.

  2. README.md – Added an "XML Namespaces" subsection documenting both namespaces, with a warning that types from the internal namespace are not guaranteed to be backwards-compatible between versions.

Copilot AI changed the title [WIP] Expose new XML namespace for internal types Expose new XML namespace for internal types Mar 31, 2026
Copy link
Copy Markdown
Contributor

@nicolaihenriksen nicolaihenriksen left a comment

Choose a reason for hiding this comment

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

Looks good to me. @Keboo are you OK with this change?

@nicolaihenriksen nicolaihenriksen marked this pull request as ready for review April 1, 2026 16:55
@nicolaihenriksen nicolaihenriksen requested a review from Keboo April 1, 2026 16:56
@nicolaihenriksen nicolaihenriksen added this to the 5.3.2 milestone Apr 1, 2026
Copy link
Copy Markdown
Member

@Keboo Keboo left a comment

Choose a reason for hiding this comment

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

Looks good! The new materialDesignInternal XML namespace cleanly exposes the internal types, and the README documentation with the backward-compatibility warning is a nice touch. Approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Public types from ".Internal" namespaces are not exposed in XML namespace TabControl Scrolling Tab Header Behavior Null Reference in Designer

3 participants