No-nonsense WPF Series 6: details about various control families

Source: Internet
Author: User

1. contentcontrol family

They all inherit contentcontrol, both of which are controls. The content attribute is named content and can only act as content by a single element.

The following controls are contained:

Buttonbase

Repeatbutton

Checkbox

Comboboxitem

Button

Contentcontrol

Lable

Frame

Toggebutton

Gridviewcolumnheader

Groupitem

Listboxitem

Radiobutton

Listviewitem

Navigationwindow

Scrollviewer

Statusbaritem

Tooltip

Usercontrol

Window

 

<Window X: class = "deepxaml. mainwindow "xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation "xmlns: x =" http://schemas.microsoft.com/winfx/2006/xaml "xmlns: Local =" CLR-namespace: deepxaml "Title =" mainwindow "Height =" 150 "width =" 220 "> <grid> <groupbox margin =" 20 "borderbrush =" red "> <groupbox. header> <textblock> Tang poetry </textblock> </groupbox. header> moonlight in front of the bed, suspected to be frost on the ground. </Groupbox> </GRID> </WINDOW>

 

2. itemscontrol family

All are derived from the itemscontrol group and are controls used to display list-based data. The content attribute is items or itemssource and both have their own entry container (itemscontainer ).

Menu, menubase, contextmenu, ComboBox, itemscontrol, ListBox, listview, tabcontrol, Treeview, selector, statusbar

<Window X: class = "deepxaml. mainwindow "xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation "xmlns: x =" http://schemas.microsoft.com/winfx/2006/xaml "xmlns: Local =" CLR-namespace: deepxaml "Title =" mainwindow "Height =" 150 "width =" 220 "> <grid> <ListBox> <textblock> Hello </textblock> <checkbox content =" Jack "> </checkbox> <button> OK </button> </ListBox> </GRID> </WINDOW>

 

<Window X: class = "deepxaml. mainwindow "xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation "xmlns: x =" http://schemas.microsoft.com/winfx/2006/xaml "xmlns: Local =" CLR-namespace: deepxaml "Title =" mainwindow "Height =" 150 "width =" 220 "> <grid> <ListBox> <listboxitem> <textblock> Hello </textblock> </listboxitem> <listboxitem> <checkbox content = "Jack"> </checkbox> </listboxitem> <button> OK </button> </ListBox> </GRID> </WINDOW>

Itemcontainer corresponding to itemscontrol

ComboBox-> comboboxitem

Contextmenu-> menuitem

ListBox-> listboxitem

Listview-> listviewitem

Menu-> menuitem

Statusbar-> statusbaritem

Tabcontrol-> tabitem

Treeview-> treeviewitem

 

3. headereditemscontrol

Are derived from headereditemscontrol and are all controls.

Displays list-based data and a title.

The content attributes include items, itemssource, and header.

 

4. decorator family

Buttonchrome, classicborderdecorator, listboxchrome, systemdropshadowchrome, border, inkpresenter, bulletdecorator, viewbox, adornerdecorator

The elements of the origin are decorated on the UI. The content attribute is child and can only act as a single element.

 

5. Shape family Elements

Are derived from the shape class, used for 2D drawing, NO content attributes, use the fill attribute to set the fill, stroke attribute to set the edge.

 

6. Panel Elements

CAVAS, dockpanel, grid, tabpanel, toolbaroverflowpanel, stackpanel, toolbarpanel, uniformgrid, virtualizingpanel, virtualizingstackpanel, wrappanel.

Are derived from the Panel abstract class. The main function is to control the UI layout. The content attribute is children, and the content can be any element. The Panel Element controls their layout.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.