Este artigo foi traduzido por máquina. Para visualizar o arquivo em inglês, marque a caixa de seleção Inglês. Você também pode exibir o texto Em inglês em uma janela pop-up, movendo o ponteiro do mouse sobre o texto.
Tradução
Inglês

Propriedade UIElement.ClipToBounds

 

Obtém ou define um valor que indica se a clip do conteúdo deste elemento (ou conteúdo proveniente dos elementos filho desse elemento ) para caber no tamanho do elemento que contém. É uma propriedade de dependência.

Namespace:   System.Windows
Assembly:  PresentationCore (em PresentationCore.dll)

public bool ClipToBounds { get; set; }

Valor da Propriedade

Type: System.Boolean

true se for necessário recortar o conteúdo; caso contrário, false. O valor padrão é false.

For child elements, P:System.Windows.UIElement.ClipToBounds has different effects on layout behaviors depending on whether the height and width of the parent element are being determined by P:System.Windows.FrameworkElement.Height / P:System.Windows.FrameworkElement.Width or P:System.Windows.FrameworkElement.MaxHeight / P:System.Windows.FrameworkElement.MaxWidth. P:System.Windows.FrameworkElement.MaxHeight / P:System.Windows.FrameworkElement.MaxWidth of the parent element are always respected regardless of the value of P:System.Windows.UIElement.ClipToBounds and the effective clipping will always clip the content based on these maximums. The parent's P:System.Windows.FrameworkElement.Height / P:System.Windows.FrameworkElement.Width settings will not clip the content when P:System.Windows.UIElement.ClipToBounds is false, but will clip the content if P:System.Windows.UIElement.ClipToBounds is true.

Note that defaulting to false is the general behavior as implemented in the T:System.Windows.UIElement class. It is possible for any given element that derives from T:System.Windows.UIElement to override the dependency property metadata for this property in that instance to default to true instead. Several existing derived classes override this metadata and/or adjust the dependency property default value.

InkCanvas, InkPresenter, and Popup each override the default value to be true.

FrameworkElement overrides the metadata for this dependency property. Specifically, FrameworkElement designates this property to allow property value inheritance (Inherits is true in metadata). Property value inheritance in this context means that if there are child elements with no other value for ClipToBounds assigned through local values or styles, the value of the nearest parent element with this value assigned (again, either in styles, by default values, or a locally value), then the value from the parent element will be assigned to all unassigned child elements by the property system. In practice this means that you can specify whether to allow clip to bounds at the root element, and that value will propagate to all child elements that have not specifically assigned it as false.

Identifier field

ClipToBoundsProperty

Metadata properties set to true

None

.NET Framework
Disponível desde 3.0
Retornar ao início
Mostrar: