# Namespace and API Mapping Reference Complete reference for mapping WPF types to WinUI 3 equivalents, based on the ImageResizer migration. ## Root Namespace Mapping | WPF Namespace | WinUI 3 Namespace | |---------------|-------------------| | `System.Windows` | `Microsoft.UI.Xaml` | | `System.Windows.Automation` | `Microsoft.UI.Xaml.Automation` | | `System.Windows.Automation.Peers` | `Microsoft.UI.Xaml.Automation.Peers` | | `System.Windows.Controls` | `Microsoft.UI.Xaml.Controls` | | `System.Windows.Controls.Primitives` | `Microsoft.UI.Xaml.Controls.Primitives` | | `System.Windows.Data` | `Microsoft.UI.Xaml.Data` | | `System.Windows.Documents` | `Microsoft.UI.Xaml.Documents` | | `System.Windows.Input` | `Microsoft.UI.Xaml.Input` | | `System.Windows.Markup` | `Microsoft.UI.Xaml.Markup` | | `System.Windows.Media` | `Microsoft.UI.Xaml.Media` | | `System.Windows.Media.Animation` | `Microsoft.UI.Xaml.Media.Animation` | | `System.Windows.Media.Imaging` | `Microsoft.UI.Xaml.Media.Imaging` | | `System.Windows.Navigation` | `Microsoft.UI.Xaml.Navigation` | | `System.Windows.Shapes` | `Microsoft.UI.Xaml.Shapes` | | `System.Windows.Threading` | `Microsoft.UI.Dispatching` | | `System.Windows.Interop` | `WinRT.Interop` | ## Core Type Mapping | WPF Type | WinUI 3 Type | |----------|-------------| | `System.Windows.Application` | `Microsoft.UI.Xaml.Application` | | `System.Windows.Window` | `Microsoft.UI.Xaml.Window` (NOT a DependencyObject) | | `System.Windows.DependencyObject` | `Microsoft.UI.Xaml.DependencyObject` | | `System.Windows.DependencyProperty` | `Microsoft.UI.Xaml.DependencyProperty` | | `System.Windows.FrameworkElement` | `Microsoft.UI.Xaml.FrameworkElement` | | `System.Windows.UIElement` | `Microsoft.UI.Xaml.UIElement` | | `System.Windows.Visibility` | `Microsoft.UI.Xaml.Visibility` | | `System.Windows.Thickness` | `Microsoft.UI.Xaml.Thickness` | | `System.Windows.CornerRadius` | `Microsoft.UI.Xaml.CornerRadius` | | `System.Windows.Media.Color` | `Windows.UI.Color` (note: `Windows.UI`, not `Microsoft.UI`) | | `System.Windows.Media.Colors` | `Microsoft.UI.Colors` | ## Controls Mapping ### Direct Mapping (namespace-only change) These controls exist in both frameworks with the same name — change `System.Windows.Controls` to `Microsoft.UI.Xaml.Controls`: `Button`, `TextBox`, `TextBlock`, `ComboBox`, `CheckBox`, `ListBox`, `ListView`, `Image`, `StackPanel`, `Grid`, `Border`, `ScrollViewer`, `ContentControl`, `UserControl`, `Page`, `Frame`, `Slider`, `ProgressBar`, `ToolTip`, `RadioButton`, `ToggleButton` ### Controls With Different Names or Behavior | WPF | WinUI 3 | Notes | |-----|---------|-------| | `MessageBox` | `ContentDialog` | Must set `XamlRoot` before `ShowAsync()` | | `ContextMenu` | `MenuFlyout` | Different API surface | | `TabControl` | `TabView` | Different API | | `Menu` | `MenuBar` | Different API | | `StatusBar` | Custom `StackPanel` layout | No built-in equivalent | | `AccessText` | Not available | Use `AccessKey` property on target control | ### WPF-UI (Lepo) to Native WinUI 3 ImageResizer used the `WPF-UI` library (Lepo) for Fluent styling. These must be replaced with native WinUI 3 equivalents: | WPF-UI (Lepo) | WinUI 3 Native | Notes | |----------------|---------------|-------| | `` | `` | Native window + `ExtendsContentIntoTitleBar` | | `` | `