UWPLearning Record4-Design andUIthe controls and patterns11, controls, and events introduction
In UWP app Development, a control is a UI element that displays content or supports interactivity . Controls are the building blocks of the user interface. We offer Powerful data controls over a range of controls for you to use, ranging from simple buttons to grid views. Patterns are a way of merging multiple controls to create new content.
To apply the Add control implementation UI, the main three steps are:
A.add the control to your app's UI.
B. Set properties for the control, such as width, height, or foreground color.
C. Add code to the control's event handlers so that it performs some tasks.
Add apps generally by:
A.1 use design tools such as Blend;
A.2 uses vs 's XAML editor;
A.3 uses code to create controls.
Next, you name the control by setting the x:name property, and you can also set various properties for the control. Finally, you can respond to various events of the control.
Of course, if you use MVVM, the properties of the control and the binding of the event are somewhat different.
2, sorting controls by function
MS provides an open source code that has been mentioned before. Finish running the following results:
This demo is also exactly the one that corresponds to the MSDN documentation. In the document, the system lists the UWP 's various controls, sorted by name, and sorted by functional category. Nature is more suitable for learning by function, and it enumerates the following categories:
App Bars and commands
Button
Collection / Data Controls
Date and Time Controls
Surfaced control
Image
Graphics and ink
Layout controls
Media controls
Navigation
Progress control
Text controls
Select a control
The very egg hurts is that theMSDN feature-by-function list of controls, by name list, and The list of controls in the demo, are a little bit off. But it's not too important to experiment with a kind of control behind it, so that when you develop an app , you can naturally choose the most appropriate control.
UWP Learning record 4-controls and patterns for design and UI 1