LayoutInformation 클래스

정의

요소의 레이아웃 상태에 대한 추가 정보를 제공하는 메서드를 정의합니다.

public ref class LayoutInformation abstract sealed
public static class LayoutInformation
type LayoutInformation = class
Public Class LayoutInformation
상속
LayoutInformation

예제

다음 예제에 사용 하는 방법을 보여 줍니다.는 GetLayoutSlot 의 경계 상자를 변환 하는 메서드를 FrameworkElementGeometryDrawing.

private void getLayoutSlot1(object sender, System.Windows.RoutedEventArgs e)
{
    RectangleGeometry myRectangleGeometry = new RectangleGeometry();
    myRectangleGeometry.Rect = LayoutInformation.GetLayoutSlot(txt1);
    Path myPath = new Path();
    myPath.Data = myRectangleGeometry;
    myPath.Stroke = Brushes.LightGoldenrodYellow;
    myPath.StrokeThickness = 5;
    Grid.SetColumn(myPath, 0);
    Grid.SetRow(myPath, 0);
    myGrid.Children.Add(myPath);
    txt2.Text = "LayoutSlot is equal to " + LayoutInformation.GetLayoutSlot(txt1).ToString();
}
Private Sub getLayoutSlot1(ByVal sender As Object, ByVal e As RoutedEventArgs)
    Dim myRectangleGeometry As New RectangleGeometry
    myRectangleGeometry.Rect = LayoutInformation.GetLayoutSlot(txt1)
    Dim myPath As New Path
    myPath.Data = myRectangleGeometry
    myPath.Stroke = Brushes.LightGoldenrodYellow
    myPath.StrokeThickness = 5
    Grid.SetColumn(myPath, 0)
    Grid.SetRow(myPath, 0)
    myGrid.Children.Add(myPath)
    txt2.Text = "LayoutSlot is equal to " + LayoutInformation.GetLayoutSlot(txt1).ToString()
End Sub

메서드

GetLayoutClip(FrameworkElement)

요소가 표시되는 영역을 나타내는 Geometry를 반환합니다.

GetLayoutExceptionElement(Dispatcher)

처리되지 않은 예외가 발생할 때 레이아웃 엔진에서 처리 중이던 UIElement를 반환합니다.

GetLayoutSlot(FrameworkElement)

자식 요소에 예약된 레이아웃 파티션을 나타내는 Rect를 반환합니다.

적용 대상