📜  WPF-控件

📅  最后修改于: 2020-11-18 09:52:42             🧑  作者: Mango


Windows Presentation Foundation(WPF)使开发人员可以轻松构建和创建基于视觉的UI丰富的应用程序。

  • WPF应用程序中还增强了其他UI框架中的经典UI元素或控件。

  • 所有标准WPF控件都可以在System.Windows.Controls的一部分工具箱中找到。

  • 这些控件也可以用XAML标记语言创建。

WPF控件的完整继承层次结构如下-

WPF的层次结构

下表包含控件的列表,我们将在后续章节中进行讨论。

Sr. No. Controls & Description
1 Button

A control that responds to user input

2 Calendar

Represents a control that enables a user to select a date by using a visual calendar display.

3 CheckBox

A control that a user can select or clear.

4 ComboBox

A drop-down list of items a user can select from.

5 ContextMenu

Gets or sets the context menu element that should appear whenever the context menu is requested through user interface (UI) from within this element.

6 DataGrid

Represents a control that displays data in a customizable grid.

7 DatePicker

A control that lets a user select a date.

8 Dialogs

An application may also display additional windows to help the user gather or display important information.

9 GridView

A control that presents a collection of items in rows and columns that can scroll horizontally.

10 Image

A control that presents an image.

11 Label

Displays text on a form. Provides support for access keys.

12 ListBox

A control that presents an inline list of items that the user can select from.

13 Menus

Represents a Windows menu control that enables you to hierarchically organize elements associated with commands and event handlers.

14 PasswordBox

A control for entering passwords.

15 Popup

Displays content on top of existing content, within the bounds of the application window.

16 ProgressBar

A control that indicates progress by displaying a bar.

17 RadioButton

A control that allows a user to select a single option from a group of options.

18 ScrollViewer

A container control that lets the user pan and zoom its content.

19 Slider

A control that lets the user select from a range of values by moving a Thumb control along a track.

20 TextBlock

A control that displays text.

21 ToggleButton

A button that can be toggled between 2 states.

22 ToolTip

A pop-up window that displays information for an element.

23 Window

The root window which provides minimize/maximize option, Title bar, border and close button

24 3rd Party Controls

Use third-party controls in your WPF applications.

我们将逐一讨论所有这些控件及其实现。