Home > OS >  Can WPF XAML extensions be used in other projects?
Can WPF XAML extensions be used in other projects?

Time:11-19

I am researching WPF XAML Extensions. However, XAML is a language, used in other project types - for example UWP, .NET MAUI etc., and the extensions don't seem to be tied to WPF. Can all the Markup Extensions mentioned in the link be used in UWP and MAUI projects, too? Attempting to change the page from .Net Framework 4.x to .NET 6.0 version is unsuccessful, as "the newest product this page is available for is .Net Framework v.4.x".
However, I managed to find equivalent UWP pages for the

I assume only these coinciding extensions can be used in UWP and that all other unmentioned extensions cannot. The same extensions appear to be available in MAUI. Are my assumptions correct?

CodePudding user response:

No. In WPF, markup extensions are derived from System.Windows.Markup.MarkupExtension.
In UWP - from Windows.UI.Xaml.Markup.MarkupExtension.
In MAUI - this is any type that implements the Microsoft.Maui.Controls.Xaml.IMarkupExtension interface.

  • Related