Skip to content

Latest commit

 

History

History
31 lines (18 loc) · 1.48 KB

scrollcontentpresenter_sizescontenttotemplatedparent.md

File metadata and controls

31 lines (18 loc) · 1.48 KB
-api-id -api-type
P:Microsoft.UI.Xaml.Controls.ScrollContentPresenter.SizesContentToTemplatedParent
winrt property

Microsoft.UI.Xaml.Controls.ScrollContentPresenter.SizesContentToTemplatedParent

-description

Gets or sets a value that indicates whether, when used in the ControlTemplate for a ScrollViewer, the presenter restricts the size of its Content to the owning ScrollViewer size.

-property-value

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.

-see-also

Content, ScrollOwner

-examples