当前位置:网站首页>WPF basic controls

WPF basic controls

2022-06-11 00:58:00 Nidhogg_ com

The default visible controls
1、Border Put it inside other controls , Draw borders for other controls , Other containers must support double labels .
2、Button Button , The button image should be set to Image, Instead of setting BackGroud by Image, If only Set the background , Button mouse passing style is still
3、Calendar The calendar
4、Canvas Canvas controls , Used for drawing . It can also be used as a container . Child controls are based on left/right and top/bottom To get the relative and canvas The location of the boundary .
5、Checkbox Check box
6、Combobox Drop down list box
7、ContentControl The content of the control .button、checkbox And so on . General controls are realistic Text The text in the , This control displays Content Text in attributes .
8、DataGrid Show tabular data
9、DataPicker Date selection control , With calendar .
10、DockPanel Dock layout container . Child controls are like boats , Definition DockPanel.Dock Property indicates up / Next / Left / Right over
11、DocumentViewer
12、Ellipse Solid ellipse
13、Expander A drop-down box
14、Frame
15、Grid Grid layout control . The interior is divided into two parts : And defining rows and columns , The width and height of a row or column can be expressed in two ways Law , By size and scale . In proportion , The expression is plus Numbers +, The way of calculation is , Like the following example , Three columns The size ratio of 1:1:2. Size and proportion can be mixed , Will deduct the dimension first , The rest is displayed proportionally . The control part needs to specify the row and column , You can set cross row (Grid.RowSpan attribute ) And span columns (Grid.ColumnSpan attribute ).
16、GridSplitter Split line
17、GroupBox Container box with title
18、Image The image control source Property to set the image path
19、Label Text label Line breaks are not supported Content Property is the displayed text
20、ListBox List selection components , It can be horizontal or vertical , The selected value can be obtained . You can use Separator Control to do Separator .
21、ListView List view . In the split view display mode, there are ViewBase Control of type , Such as GridView Control , Only one and data source can be placed . If only the data is displayed , use separately GridView That's it , So this is often associated with a data source , There are multiple View The situation of . Provides a right-click menu .
22、MediaElement Play video and audio , By default, there is nothing on the interface , You need to call... In your code Play() Fang The law will play .
23、Menu menu bar , Usually on the top , Such as vs Top , The row under the title .
24、PasswordBox Password input box . The input is displayed as
******
25、ProgressBar Progress bar .value Property indicates progress , Range 0¬100
26、RadioButton Radio button
27、Rectangle Solid rectangle
28、RichTextBox Rich text input box
29、ScrollBar Scroll bar . I haven't seen anything used alone , Usually, they just put one on the outside ScrollViewer
30、ScrollViewer Container with scroll bar .
31、Separtor Vertical separation line , It can be used for ToolBar Middle split button group .
32、Slider Slider bar , When users focus on relative size , Instead of specific numbers . Commonly used voice volume control, etc .
33、StackPanel Stacking containers . Child controls each occupy a row or column .Orientation Property to set landscape Horizontal And vertical Vertical
34、StatusBar status bar , Usually at the bottom , Display various status information .
35、TabControl tab Tabs and corresponding containers
36、TextBlock Text block Text Property is the display content ,TextWrapping="Wrap" Indicates that the line breaks display text .
37、TextBox The text box
38、ToolBar The toolbar , Exclusive line when used alone .
39、TolBarPanel Inherited from StackPanel, Toolbar container .
40、ToolBarTray Toolbar collection , Use when there are multiple toolbars . Inside ToolBar No longer a monopoly .
41、TreeView Tree view .
42、Viewbox It mainly provides stretching for child controls .
43、WebBrowser built-in Web browser (IE kernel , Don't pretend IE Out-of-service )
44、WindowsFormsHost This one supports WinForm Control .
45、WrapPanel A container that wraps a block of elements . Child controls are piece by piece , From left to right , If it exceeds the right Frame , Then line break ; Beyond the lower boundary , Then hide .

Controls that cannot be seen by default
1、 file
DocumentViewerBase Provides for displaying fixed or flowing content ( By System.Windows.Documents.FixedDocument or System.Windows.Documents.FlowDocument Express ) Base class for viewer for . DocumentPageView Indicates paged System.Windows.Documents.DocumentPage Viewport of .
FlowDocumentPageViewer Represents a control used to view the content of a stream in fixed view mode , This mode one One page at a time . FlowDocument With advanced document functions ( Such as paging and columns ) Load stream content and format stream content . Define a file , Document style .

原网站

版权声明
本文为[Nidhogg_ com]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203020626176349.html