Typical structure of anchor layout:
<x:panel layout="Anchor"runat="Server">
2<Items>
3<x:panel runat="Server"Anchorvalue="100% 30%"></x:Panel>
4<x:panel runat="Server"Anchorvalue="100% 70%"></x:Panel>
5</Items>
6 </x:Panel>
There are two key points:
1. The layout property of the parent container is set to anchor
2. Each child container control sets the Anchorvalue property, which is used for the child control's anchor layout parameters.
Value of Anchorvalue
There are two values, the middle space split. It can also be a value, and the second value is the default value.
These two value distributions represent the horizontal anchor value and the vertical anchor point value. is the width and height,
Anchorvalue can be made up of a score or an integer value .
- hundred points
- anchorvalue= "100% 60%", indicating this The control occupies all the width and height of 60%.
- anchorvalue= "100%", This control occupies all width, height automatically.
- Integer value (can be positive or negative)
- Anchorvalue= "-100-20", which indicates that the right border of this control is 100px from the right edge of the parent control, and the bottom edge of this control is 20px from the bottom border of the parent control.
- anchorvalue= "100 20", which indicates that the right border of this control is outside the parent control to the right of the box 100px, the control under the bounding rectangle outside the parent control 20px.
This can also be true:
anchorvalue= "100%-20", which indicates that this control occupies the full width of the parent control, and the bottom border of this control is 20px below the parent control.
Fineui 12th Day