Preliminary study on "longhorn" application development deployment (2)

zhaozj2021-02-11  198

Author: Dino Esposito translation: winsome zhong

Third, XAML Language XAML consists of four types of elements - panels, interactive controls, document objects (Documents), and grapes. In addition, the Border element is also important, although it does not belong to the four major elements. In XAML, Panel is responsible for managing page layout and is a container of other elements, controlling their size, location, and content of the content. Longhorn built 6 PANEL classes - Canvas, DockPanel, FlowPanel, Gridpanel, Table, and TextPanel. But developers can create their own Panel to customize their drawing behavior. Canvas is the only support coordinate in the panel, which is drawn from a fixed location, with a specific size. If the two control elements overlap, the one of the draws will overwrite the previous one. Note that the coordinates are relative to Canvas, (0, 0) represents the top left corner of Canvas. Below is an example of a Canvas object: , DockPanel is not like this, DockPanel All control elements are vertical or horizontally Dock, and the coordinates are not required on the DockPanel, and the control position is relative to the previous control. DockPanel is an ideal choice for creating toolbars.

For example:

转载请注明原文地址:https://www.9cbs.com/read-5276.html

New Post(0)