I'm not entirely sure if this is the best place to put this statement, as this behavior is actually not limited just to the Border. And it's also a little bit of a simplification. In fact the Border (and this behavior might differ between controls) will always take all of the available space defined by its parent as a minimum size it should take.
Each container will provide its children with a size boundary defined by the MinSize and the MaxSize. Some of the containers (like the Background or Style) will simply propagate their parents' limits to their children. Others (like Margin and Border) will slightly modify those limits based on offsets. And finally, there are also those containers that completely override their parents' limits based on their own layout rules.
So the truth is a little bit more complex. Maybe it would be a good idea to create some kind of a table that would show what would be the size of a control (and its content if its a container) based on its size limits and its content size.
I'm not entirely sure if this is the best place to put this statement, as this behavior is actually not limited just to the
Border
. And it's also a little bit of a simplification. In fact the Border (and this behavior might differ between controls) will always take all of the available space defined by its parent as a minimum size it should take.Each container will provide its children with a size boundary defined by the
MinSize
and theMaxSize
. Some of the containers (like theBackground
orStyle
) will simply propagate their parents' limits to their children. Others (likeMargin
andBorder
) will slightly modify those limits based on offsets. And finally, there are also those containers that completely override their parents' limits based on their own layout rules.So the truth is a little bit more complex. Maybe it would be a good idea to create some kind of a table that would show what would be the size of a control (and its content if its a container) based on its size limits and its content size.