Freigeben über


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 Windows Presentation Foundation equivalent control Remarks

BindingNavigator

No equivalent control.

BindingSource

CollectionViewSource

Button

Button

CheckBox

CheckBox

CheckedListBox

ListBox with composition.

ColorDialog

No equivalent control.

ComboBox

ComboBox

ComboBox does not support auto-complete.

ContextMenuStrip

ContextMenu

DataGridView

No equivalent control.

Some capabilities of the DataGridView control are reproduced with the ListView and GridView controls.

DateTimePicker

No equivalent control.

DomainUpDown

TextBox and two RepeatButton controls.

ErrorProvider

No equivalent control.

FlowLayoutPanel

WrapPanel

FolderBrowserDialog

No equivalent control.

FontDialog

No equivalent control.

Form

Window

Window does not support child windows.

GroupBox

GroupBox

HelpProvider

No equivalent control.

No F1 Help. "What's This" Help is replaced by ToolTips.

HScrollBar

ScrollBar

Scrolling is built into container controls.

ImageList

No equivalent control.

Label

Label

LinkLabel

No equivalent control.

ListBox

ListBox

ListView

ListView

The ListView control provides a read-only details view.

MaskedTextBox

No equivalent control.

MenuStrip

Menu

Menu control styling can approximate the behavior and appearance of the System.Windows.Forms.ToolStripProfessionalRenderer class.

MonthCalendar

No equivalent control.

NotifyIcon

No equivalent control.

NumericUpDown

TextBox and two RepeatButton controls.

OpenFileDialog

OpenFileDialog

The OpenFileDialog class is a WPF wrapper around the Win32 control.

PageSetupDialog

No equivalent control.

Panel

Canvas

PictureBox

Image

PrintDialog

PrintDialog

PrintDocument

No equivalent control.

PrintPreviewControl

DocumentViewer

PrintPreviewDialog

No equivalent control.

ProgressBar

ProgressBar

PropertyGrid

No equivalent control.

RadioButton

RadioButton

RichTextBox

RichTextBox

SaveFileDialog

SaveFileDialog

The SaveFileDialog class is a WPF wrapper around the Win32 control.

ScrollableControl

ScrollViewer

SoundPlayer

MediaPlayer

SplitContainer

GridSplitter

StatusStrip

StatusBar

TabControl

TabControl

TableLayoutPanel

Grid

TextBox

TextBox

Timer

DispatcherTimer

ToolStrip

ToolBar

ToolStripContainer

ToolBar with composition.

ToolStripDropDown

ToolBar with composition.

ToolStripDropDownMenu

ToolBar with composition.

ToolStripPanel

ToolBar with composition.

ToolTip

ToolTip

TrackBar

Slider

TreeView

TreeView

UserControl

UserControl

VScrollBar

ScrollBar

Scrolling is built into container controls.

WebBrowser

Frame

Both the Frame control and the System.Windows.Forms.WebBrowser control can host HTML pages.

See Also

Tasks

Walkthrough: Hosting a Windows Forms Control in Windows Presentation Foundation

Reference

ElementHost
WindowsFormsHost

Concepts

Walkthrough: Hosting a Windows Presentation Foundation Control in Windows Forms

Other Resources

Migration and Interoperability