WPF responsive layout panel

DockPanel: Park by the panel:

DockPanel define a region, in this region, can be arranged in the form of the sub-elements of the plot points, these objects are located
Children property. Dock dock panel similar properties in WinForm control. DockPanel would sort each sub-element, and will be parked according to the specified side, a plurality of stop elements on the same side of the press order. In DockPanel, the specified control is docked side, the occupation will be in the order defined corners, all controls will never overlap, controls define the space occupied by other post-defined control is not accounted for a little bit, only use the remaining space, regardless of the setting of any value to the last stop DockPanel child element of the child element will always fill the remaining space. If you do not want the last element to fill the remaining area may be DockPanel LastChildFill property set to false, but also must explicitly specify the direction of stop to the last child element.

Use: adaptive window layout

The following shows property DockPanel LastChildFill two cases:

The first is: do not set LastChildFill property by default:

Second: Set LastChildFill property to false

It can be adaptive, suitable for adaptive window layout

Guess you like

Origin blog.csdn.net/weixin_44589117/article/details/92427851