Files
docs-desktop/dotnet-desktop-guide/framework/wpf/advanced/windows-forms-controls-and-equivalent-wpf-controls.md
Andy (Steve) De George be103da07e Replace various WPF include files with content (#1335)
* net-current-v30plus-md.md

* net-current-v40plus-md.md

* tla2sharptla-ui-md.md

* tla2sharptla-uiautomation-md.md

* tla2sharptla-winclient-md.md

* tla2sharptla-xaml-md.md

* tlasharptla-ui-md.md

* tlasharptla-uiautomation-md.md

* tlasharptla-winclient-md.md

* tlasharptla-xaml-md.md

* fix warnings
2022-03-16 12:14:11 -04:00

7.8 KiB

title, titleSuffix, ms.date, helpviewer_keywords, ms.assetid
title titleSuffix ms.date helpviewer_keywords ms.assetid
Windows Forms Controls and Equivalent WPF Controls 03/30/2017
Windows Forms [WPF], interoperability with
Windows Forms [WPF], WPF interoperation
interoperability [WPF], Windows Forms
8a157e6b-8054-46db-a5cf-a78966acc7a1

Windows Forms Controls and Equivalent WPF Controls

Many Windows Forms controls have equivalent WPF controls, but some Windows Forms controls have no equivalents in WPF. This topic compares control types provided by the two technologies.

You can always use interoperation to host Windows Forms controls that do not have equivalents in your WPF-based applications.

The following table shows which Windows Forms controls and components have equivalent WPF control functionality.

Windows Forms control WPF equivalent control Remarks
xref:System.Windows.Forms.BindingNavigator No equivalent control.
xref:System.Windows.Forms.BindingSource xref:System.Windows.Data.CollectionViewSource
xref:System.Windows.Forms.Button xref:System.Windows.Controls.Button
xref:System.Windows.Forms.CheckBox xref:System.Windows.Controls.CheckBox
xref:System.Windows.Forms.CheckedListBox xref:System.Windows.Controls.ListBox with composition.
xref:System.Windows.Forms.ColorDialog No equivalent control.
xref:System.Windows.Forms.ComboBox xref:System.Windows.Controls.ComboBox xref:System.Windows.Controls.ComboBox does not support auto-complete.
xref:System.Windows.Forms.ContextMenuStrip xref:System.Windows.Controls.ContextMenu
xref:System.Windows.Forms.DataGridView xref:System.Windows.Controls.DataGrid
xref:System.Windows.Forms.DateTimePicker xref:System.Windows.Controls.DatePicker
xref:System.Windows.Forms.DomainUpDown xref:System.Windows.Controls.TextBox and two xref:System.Windows.Controls.Primitives.RepeatButton controls.
xref:System.Windows.Forms.ErrorProvider No equivalent control.
xref:System.Windows.Forms.FlowLayoutPanel xref:System.Windows.Controls.WrapPanel or xref:System.Windows.Controls.StackPanel
xref:System.Windows.Forms.FolderBrowserDialog No equivalent control.
xref:System.Windows.Forms.FontDialog No equivalent control.
xref:System.Windows.Forms.Form xref:System.Windows.Window xref:System.Windows.Window does not support child windows.
xref:System.Windows.Forms.GroupBox xref:System.Windows.Controls.GroupBox
xref:System.Windows.Forms.HelpProvider No equivalent control. No F1 Help. "What's This" Help is replaced by ToolTips.
xref:System.Windows.Forms.HScrollBar xref:System.Windows.Controls.Primitives.ScrollBar Scrolling is built into container controls.
xref:System.Windows.Forms.ImageList No equivalent control.
xref:System.Windows.Forms.Label xref:System.Windows.Controls.Label
xref:System.Windows.Forms.LinkLabel No equivalent control. You can use the xref:System.Windows.Documents.Hyperlink class to host hyperlinks within flow content.
xref:System.Windows.Forms.ListBox xref:System.Windows.Controls.ListBox
xref:System.Windows.Forms.ListView xref:System.Windows.Controls.ListView The xref:System.Windows.Controls.ListView control provides a read-only details view.
xref:System.Windows.Forms.MaskedTextBox No equivalent control.
xref:System.Windows.Forms.MenuStrip xref:System.Windows.Controls.Menu xref:System.Windows.Controls.Menu control styling can approximate the behavior and appearance of the xref:System.Windows.Forms.ToolStripProfessionalRenderer?displayProperty=nameWithType class.
xref:System.Windows.Forms.MonthCalendar xref:System.Windows.Controls.Calendar
xref:System.Windows.Forms.NotifyIcon No equivalent control.
xref:System.Windows.Forms.NumericUpDown xref:System.Windows.Controls.TextBox and two xref:System.Windows.Controls.Primitives.RepeatButton controls.
xref:System.Windows.Forms.OpenFileDialog xref:Microsoft.Win32.OpenFileDialog The xref:Microsoft.Win32.OpenFileDialog class is a WPF wrapper around the Win32 control.
xref:System.Windows.Forms.PageSetupDialog No equivalent control.
xref:System.Windows.Forms.Panel xref:System.Windows.Controls.Canvas
xref:System.Windows.Forms.PictureBox xref:System.Windows.Controls.Image
xref:System.Windows.Forms.PrintDialog xref:System.Windows.Controls.PrintDialog
xref:System.Drawing.Printing.PrintDocument No equivalent control.
xref:System.Windows.Forms.PrintPreviewControl xref:System.Windows.Controls.DocumentViewer
xref:System.Windows.Forms.PrintPreviewDialog No equivalent control.
xref:System.Windows.Forms.ProgressBar xref:System.Windows.Controls.ProgressBar
xref:System.Windows.Forms.PropertyGrid No equivalent control.
xref:System.Windows.Forms.RadioButton xref:System.Windows.Controls.RadioButton
xref:System.Windows.Forms.RichTextBox xref:System.Windows.Controls.RichTextBox
xref:System.Windows.Forms.SaveFileDialog xref:Microsoft.Win32.SaveFileDialog The xref:Microsoft.Win32.SaveFileDialog class is a WPF wrapper around the Win32 control.
xref:System.Windows.Forms.ScrollableControl xref:System.Windows.Controls.ScrollViewer
xref:System.Media.SoundPlayer xref:System.Windows.Media.MediaPlayer
xref:System.Windows.Forms.SplitContainer xref:System.Windows.Controls.GridSplitter
xref:System.Windows.Forms.StatusStrip xref:System.Windows.Controls.Primitives.StatusBar
xref:System.Windows.Forms.TabControl xref:System.Windows.Controls.TabControl
xref:System.Windows.Forms.TableLayoutPanel xref:System.Windows.Controls.Grid
xref:System.Windows.Forms.TextBox xref:System.Windows.Controls.TextBox
xref:System.Windows.Forms.Timer xref:System.Windows.Threading.DispatcherTimer
xref:System.Windows.Forms.ToolStrip xref:System.Windows.Controls.ToolBar
xref:System.Windows.Forms.ToolStripContainer xref:System.Windows.Controls.ToolBar with composition.
xref:System.Windows.Forms.ToolStripDropDown xref:System.Windows.Controls.ToolBar with composition.
xref:System.Windows.Forms.ToolStripDropDownMenu xref:System.Windows.Controls.ToolBar with composition.
xref:System.Windows.Forms.ToolStripPanel xref:System.Windows.Controls.ToolBar with composition.
xref:System.Windows.Forms.ToolTip xref:System.Windows.Controls.ToolTip
xref:System.Windows.Forms.TrackBar xref:System.Windows.Controls.Slider
xref:System.Windows.Forms.TreeView xref:System.Windows.Controls.TreeView
xref:System.Windows.Forms.UserControl xref:System.Windows.Controls.UserControl
xref:System.Windows.Forms.VScrollBar xref:System.Windows.Controls.Primitives.ScrollBar Scrolling is built into container controls.
xref:System.Windows.Forms.WebBrowser xref:System.Windows.Controls.Frame, xref:System.Windows.Controls.WebBrowser?displayProperty=nameWithType The xref:System.Windows.Controls.Frame control can host HTML pages.

Starting in the .NET Framework 3.5 SP1, the xref:System.Windows.Controls.WebBrowser?displayProperty=nameWithType control can host HTML pages and also backs the xref:System.Windows.Controls.Frame control.

See also