IRawElementProviderFragment.BoundingRectangle Propriedade

Definição

Obtém o retângulo delimitador deste elemento.

public:
 property System::Windows::Rect BoundingRectangle { System::Windows::Rect get(); };
public System.Windows.Rect BoundingRectangle { get; }
member this.BoundingRectangle : System.Windows.Rect
Public ReadOnly Property BoundingRectangle As Rect

Valor de Propriedade

O retângulo delimitador, em coordenadas do ecrã.

Exemplos

No seguinte exemplo de código, o estado interno do retângulo delimitador é mantido num System.Drawing.Rectangle, que é convertido num System.Windows.Rect antes de ser devolvido.

/// <summary>
/// Gets the bounding rectangle.
/// </summary>
public System.Windows.Rect BoundingRectangle
{
    get 
    {
        return new System.Windows.Rect(myBounds.X, myBounds.Y, myBounds.Width, myBounds.Height);
    }
}
''' <summary>
''' Gets the bounding rectangle.
''' </summary>

Public ReadOnly Property BoundingRectangle() As System.Windows.Rect _
    Implements IRawElementProviderFragment.BoundingRectangle
    Get
        Return New System.Windows.Rect(myBounds.X, myBounds.Y, myBounds.Width, myBounds.Height)
    End Get
End Property

Observações

Não é necessário clipping se o elemento estiver parcialmente obscurecido ou parcialmente fora de cena. A IsOffscreen propriedade deve ser definida para indicar se o retângulo é realmente visível.

Nem todos os pontos dentro do retângulo delimitador são necessariamente clicáveis.

Aplica-se a

Ver também