StackPanel
measures its children with infinity in the direction of its Orientation, so an infinite height when the Orientation is Vertical; the other orientation is usually given the constraint it got.
Canvas
always measures its children with an infinite width and height.
For a ScrollViewer
, if the Content implements IScrollInfo (i.e. it provides the scrolling functionality) and its CanContentScroll
is true then the child is measured based on the constraint it is given, possibly minus the amount needed for the scrollbar(s) if they are shown. Of course then it is responsible for handling the scrolling.