Skip to content

Commit 1afeee1

Browse files
Expose new XML namespace for internal types (#4031)
* Initial plan * Add materialDesignInternal XML namespace and update README documentation Agent-Logs-Url: https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/sessions/7b42c504-036c-4afa-bada-baba0a8efd08 Co-authored-by: nicolaihenriksen <19572699+nicolaihenriksen@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nicolaihenriksen <19572699+nicolaihenriksen@users.noreply.github.com>
1 parent 08546c5 commit 1afeee1

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,25 @@ Install-Package MaterialDesignThemes
8383
[...] >
8484
```
8585

86+
### XML Namespaces
87+
88+
The toolkit exposes two XML namespaces for use in XAML:
89+
90+
| Prefix | URI | Description |
91+
|--------|-----|-------------|
92+
| `materialDesign` | `http://materialdesigninxaml.net/winfx/xaml/themes` | Primary namespace for all public Material Design types, controls, and converters. |
93+
| `materialDesignInternal` | `http://materialdesigninxaml.net/winfx/xaml/themes-internal` | Namespace for types in internal sub-namespaces (`MaterialDesignThemes.Wpf.Internal`, `MaterialDesignThemes.Wpf.Converters.Internal`, `MaterialDesignThemes.Wpf.Behaviors.Internal`). |
94+
95+
> [!WARNING]
96+
> Types exposed via the `materialDesignInternal` namespace are considered **internal implementation details** and are **not guaranteed to maintain backwards-compatibility between versions**. Use them at your own risk.
97+
98+
To use the internal namespace in XAML:
99+
100+
```xml
101+
<Window ...
102+
xmlns:materialDesignInternal="http://materialdesigninxaml.net/winfx/xaml/themes-internal">
103+
```
104+
86105

87106
## Building the source
88107

src/MaterialDesignThemes.Wpf/Properties/AssemblyInfo.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
[assembly: XmlnsDefinition("http://materialdesigninxaml.net/winfx/xaml/themes", "MaterialDesignThemes.Wpf.Transitions")]
66
[assembly: XmlnsDefinition("http://materialdesigninxaml.net/winfx/xaml/themes", "MaterialDesignThemes.Wpf.Converters")]
77

8+
[assembly: XmlnsPrefix("http://materialdesigninxaml.net/winfx/xaml/themes-internal", "materialDesignInternal")]
9+
[assembly: XmlnsDefinition("http://materialdesigninxaml.net/winfx/xaml/themes-internal", "MaterialDesignThemes.Wpf.Internal")]
10+
[assembly: XmlnsDefinition("http://materialdesigninxaml.net/winfx/xaml/themes-internal", "MaterialDesignThemes.Wpf.Converters.Internal")]
11+
[assembly: XmlnsDefinition("http://materialdesigninxaml.net/winfx/xaml/themes-internal", "MaterialDesignThemes.Wpf.Behaviors.Internal")]
12+
813
// Setting ComVisible to false makes the types in this assembly not visible
914
// to COM components. If you need to access a type in this assembly from
1015
// COM, set the ComVisible attribute to true on that type.

0 commit comments

Comments
 (0)