First, System control classification
- FrameworkElement class
- Panel class
- Control class
- ContentControl class
- ItemsControl class
1) FrameworkElement class
Derived from the UIElement class, the UIElement class is the base class for most objects in Windows 10 that have a visual appearance and handle basic input, encapsulating some underlying UI events such as keyboard events, touch events, and so on, but the UIElement class has no exposed constructors. Its role is to encapsulate the underlying operation of the UI as the base class of the FrameworkElement class.
The FrameworkElement class extends the UIElement and adds a layout-related method, properties, and support for data binding. Therefore, all controls are derived from the FrameworkElement class. For classes that derive directly from the FrameworkElement class, the control has only the most basic characteristics of the WINDOWS10 control.
2) Panel class
Derived from the FrameworkElement class, providing a base class for all panel elements. A panel element is used in Windows 10 applications to measure and arrange child objects. The feature that the Panel class encapsulates is the commonality of layout controls, which are used by the control that derives from the Panel class for layout-related controls.
3) Control class
The control class derives from the FrameworkElement class, which represents the base class of the user interface element, which is defined by ControlTemplate, andControlTemplate is a template for the control, consisting of multiple elements that can be modified and defined directly by the user. You can modify the template to make a large modification and definition of its appearance.
4) ContentControl class
ContentControl derives from the control class, which has all the feature attributes of the control class, representing controls that contain a single item of content. The biggest feature of Concentcontrol is the content property, which can be any type of variable, such as String type, datatime type, or even UIElement type. When the content type is set to UIElement, UIElement will be displayed in ContentControl. For other types of objects, the ContentControl object displays a string representation of the object.
5) ItemsControl Class
The ItemsControl class is also derived from the control class, which represents an item that can be used to render a collection of items.
The ItemsControl class itself is also a list control that can be used directly on the UI as a list control and can be used to render a fixed set of items, or to display a list obtained from a data binding that points to an object. The ItemsControl class encapsulates only the basic features of some lists, and more advanced features require the use of their derived classes.
The system controls on the WINDOWS10 are divided into the following 5 categories according to the above five base classes:
1) Panel control
Such controls are derived from the Panel class and contain canvas, Grid, StackPanel, and Relativepanel controls, which are commonly used for interface layout
2) Content Controls
This type of control is derived from the ContentControl class and provides a content property for customizing the contents of the control, including button, RadioButton, Hyperlinkbutton, CheckBox, and ScrollViewer controls.
3) List control
This type of control is derived from the ItemsControl class and is often used to display a collection of data, including a ListBox, Pivot, ListView, and GridView controls. The most important feature of a list control is the presentation of the data for the list, with the most significant attributes:
Items: A collection that is used to generate control content;
Itemspanel: A panel that defines the layout of the control;
ItemsSource: A collection of content that generates ItemsControl ;
Itemstemplate: DataTemplate for displaying each item
4) Common Controls
These controls derive directly from the control class and contain controls such as TextBox, PasswordBox, ProgressBar, ScrollBar, slider, and so on.
A common feature of this type of control is the ability to customize or modify the data template of a control.
5) Other controls
Such controls are not derived from the control class, but are derived directly from the FrameworkElement class, including the TextBlock, Border, Image, MediaElement, and popup controls.
Because these controls are derived from the lowest base class, the functionality that is implemented is very fundamental.
Reading Notes 1:UWP Control structure classification