Control (including contentcontrol) and contentpresenter
Measureoverride: uses the available space to measure the first visual tree subnode (call the measure (availablesize parameter) and returns the expected size of the member (desiredsize of the uielement ).
Arrangeoverride: place the first visual tree subnode view on the (0, 0) coordinate of the current final size (call arrange and use (0, 0, finalsize) as the parameter ).
Textblock
Measureoverride and arrangeoverride return the minimum size of the text (if both the height and width are double. Nan, the default value is as follows)
Adorner
Measureoverride: uses the display size of the modified object to measure the size of each sub-node in the visual tree (call the measure (adornedelement. rendersize) of each sub-node )).
Arrangeoverride: The adorner class does not override the arrangeoverride method of frameworkelement. Note: manually rewrite it in your custom adorner.