IRawElementProviderFragment.BoundingRectangle Właściwość

Definicja

Pobiera prostokąt ograniczenia tego elementu.

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

Wartość właściwości

Prostokąt ograniczenia we współrzędnych ekranu.

Przykłady

W poniższym przykładowym kodzie wewnętrzny stan prostokąta ograniczenia jest przechowywany w obiekcie System.Drawing.Rectangle, który jest konwertowany na element przed zwróceniem System.Windows.Rect .

/// <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

Uwagi

Nie jest wymagane wycinki, jeśli element jest częściowo zaciemniany lub częściowo poza ekranem. Właściwość powinna być ustawiona IsOffscreen tak, aby wskazywała, czy prostokąt jest rzeczywiście widoczny.

Nie wszystkie punkty w obrębie prostokąta ograniczenia są koniecznie możliwe do kliknięcia.

Dotyczy

Zobacz też