# 控件

Avalonia provides following groups of controls:

* [Layout controls](#layout)
* [Buttons](#buttons)
* [Data display controls](#data-display)
* [Text display and editing](#text)
* [Value selection](#value-selectors)
* [Displaying images](#images)
* [Date and time controls](#date-and-time)
* [Menus](#menus)

## Layout

Layout controls provide ability for developer to arrange child controls according to specific rules.

### [Border](https://avaloniachina.gitbook.io/avalonia/docs/controls/border)

A control which decorates a child with a border and background.

### [Canvas](https://avaloniachina.gitbook.io/avalonia/docs/controls/canvas)

A panel that displays child controls at arbitrary locations.

### [DockPanel](https://avaloniachina.gitbook.io/avalonia/docs/controls/dockpanel)

A panel which arranges its children at the top, bottom, left, right or center.

### [Expander](https://avaloniachina.gitbook.io/avalonia/docs/controls/expander)

A control with a header that has a collapsible content section.

### [Grid](https://avaloniachina.gitbook.io/avalonia/docs/controls/grid)

A flexible grid area that consists of columns and rows.

### [GridSplitter](https://avaloniachina.gitbook.io/avalonia/docs/controls/gridsplitter)

Redistributes space between columns or rows of a [Grid](https://avaloniachina.gitbook.io/avalonia/docs/controls/grid) control.

### [Panel](https://avaloniachina.gitbook.io/avalonia/docs/controls/panel)

Base class for controls that can contain multiple children.

### [RelativePanel](https://avaloniachina.gitbook.io/avalonia/docs/controls/relativepanel)

Defines an area within which you can position and align child objects in relation to each other or the parent panel.

### [ScrollBar](https://avaloniachina.gitbook.io/avalonia/docs/controls/scrollbar)

A scrollbar control.

### [ScrollViewer](https://avaloniachina.gitbook.io/avalonia/docs/controls/scrollviewer)

A control scrolls its content if the content is bigger than the space available.

### [SplitView](https://avaloniachina.gitbook.io/avalonia/docs/controls/splitview)

A control with two views: A collapsible pane and an area for content.

### [StackPanel](https://avaloniachina.gitbook.io/avalonia/docs/controls/stackpanel)

A panel which lays out its children horizontally or vertically.

### UniformGrid

A panel with uniform column and row sizes.

### [Window](https://avaloniachina.gitbook.io/avalonia/docs/getting-started/windows)

A top-level window.

### [WrapPanel](https://avaloniachina.gitbook.io/avalonia/docs/controls/wrappanel)

Positions child elements in sequential position from left to right, breaking content to the next line at the edge of the containing box.

## Buttons

### [Button](https://github.com/avaloniachina/Documentation/blob/master/docs/controls/button.md)

A button control.

### [RepeatButton](https://github.com/avaloniachina/Documentation/blob/master/docs/controls/repeatbutton.md)

Represents a control that raises its click event repeatedly when it is pressed and held.

### [RadioButton](https://github.com/avaloniachina/Documentation/blob/master/docs/controls/radiobutton.md)

Represents a button that allows a user to select a single option from a group of options.

### [ToggleButton](https://github.com/avaloniachina/Documentation/blob/master/docs/controls/togglebutton.md)

Represents a control that a user can select (check) or clear (uncheck).

### [ButtonSpinner](https://github.com/avaloniachina/Documentation/blob/master/docs/controls/buttonspinner.md)

Represents a spinner control that includes two Buttons

### [SplitButton](https://github.com/avaloniachina/Documentation/blob/master/docs/controls/SplitButton.md)

Functions as a button with primary and secondary parts that can each be pressed separately. The primary part behaves like normal button and the secondary part opens a flyout with additional actions.

### [ToggleSplitButton](https://github.com/avaloniachina/Documentation/blob/master/docs/controls/ToggleSplitButton.md)

Functions as a toggle button with primary and secondary parts that can each be pressed separately. The primary part behaves like a normal toggle button and the secondary part opens a flyout with additional actions.

## Data Display

These controls helps display data, either in tabular or list form.

### [DataGrid](https://avaloniachina.gitbook.io/avalonia/docs/controls/datagrid)

Displays data in a customizable grid.

### [ItemsControl](https://avaloniachina.gitbook.io/avalonia/docs/controls/itemscontrol)

Displays a collection of items.

### [ItemsRepeater](https://avaloniachina.gitbook.io/avalonia/docs/controls/itemsrepeater)

Represents a data-driven collection control that incorporates a flexible layout system, custom views, and virtualization.

### [ListBox](https://avaloniachina.gitbook.io/avalonia/docs/controls/listbox)

An items control in which individual items can be selected.

## Text

Controls for displaying and editing text

### [AutoCompleteBox](https://avaloniachina.gitbook.io/avalonia/docs/controls/autocompletebox)

Represents a control that provides a text box for user input and a drop-down that contains possible matches based on the input in the text box.

### [TextBlock](https://avaloniachina.gitbook.io/avalonia/docs/controls/textblock)

A control that displays a block of text.

### [TextBox](https://avaloniachina.gitbook.io/avalonia/docs/controls/textbox)

Represents a control that can be used to display or edit unformatted text.

### [MaskedTextBox](https://avaloniachina.gitbook.io/avalonia/docs/controls/maskedtextbox)

Represents a control that can be used to display or edit text format it uses a mask to distinguish between proper and improper user input format.

## Value selectors

### [CheckBox](https://avaloniachina.gitbook.io/avalonia/docs/controls/checkbox)

A check box control.

### [ComboBox](https://avaloniachina.gitbook.io/avalonia/docs/controls/combobox)

A drop-down list control.

### [Slider](https://avaloniachina.gitbook.io/avalonia/docs/controls/slider)

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

## Images

These controls display bitmap or vector images.

### DrawingImage

Displays a vector image.

### [Image](https://avaloniachina.gitbook.io/avalonia/docs/controls/image)

Displays a bitmap image.

## Date and Time

Set of controls which gives you ability display display and select dates, point of time, or display calendar..

### [Calendar](https://avaloniachina.gitbook.io/avalonia/docs/controls/calendar)

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

### CalendarDatePicker

A control for selecting dates with a calendar drop-down.

### [DatePicker](https://avaloniachina.gitbook.io/avalonia/docs/controls/datepicker)

A control to allow the user to select a date.

### [TimePicker](https://avaloniachina.gitbook.io/avalonia/docs/controls/timepicker)

A control to allow the user to select a time.

## Menus

### [ContextMenu](https://avaloniachina.gitbook.io/avalonia/docs/controls/contextmenu)

A context menu attached to a control.

### [Menu](https://avaloniachina.gitbook.io/avalonia/docs/controls/menu)

A top-level menu control.
