-api-id | -api-type |
---|---|
P:Microsoft.UI.Xaml.Controls.ScrollContentPresenter.SizesContentToTemplatedParent |
winrt property |
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.
true if the presenter restricts its Content size to the owning ScrollViewer size; otherwise, false. The default is false.
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.