ScrollContentPresenter.SizesContentToTemplatedParent Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
property bool SizesContentToTemplatedParent { bool get(); void set(bool value); };
bool SizesContentToTemplatedParent();
void SizesContentToTemplatedParent(bool value);
public bool SizesContentToTemplatedParent { get; set; }
var boolean = scrollContentPresenter.sizesContentToTemplatedParent;
scrollContentPresenter.sizesContentToTemplatedParent = boolean;
Public Property SizesContentToTemplatedParent As Boolean
Property Value
bool
true if the presenter restricts its Content size to the owning ScrollViewer size; otherwise, false. The default is false.
Remarks
By default, when a ScrollContentPresenter is sizing its Content during layout, it allows the content to be as wide as the content desires if CanHorizontallyScroll is true, and allows the content to be as high as the content desires if CanVerticallyScroll is true.
When the ScrollContentPresenter is used in the ControlTemplate for a ScrollViewer, setting the SizesContentToTemplatedParent property to true causes it to restrict the size of its Content to the owning ScrollViewer size.