LayoutInformation クラス

定義

要素のレイアウト状態に関する追加情報を提供するメソッドを定義します。Defines methods that provide additional information about the layout state of an element.

public ref class LayoutInformation abstract sealed
public static class LayoutInformation
type LayoutInformation = class
Public Class LayoutInformation
継承
LayoutInformation

次の例では、 GetLayoutSlotメソッドを使用して、 FrameworkElement GeometryDrawingの境界ボックスをに変換する方法を示します。The following example demonstrates how to use the GetLayoutSlot method to translate the bounding box of a FrameworkElement into a GeometryDrawing.

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 を返します。Returns a Geometry that represents the visible region of an element.

GetLayoutExceptionElement(Dispatcher)

未処理の例外が発生した時点でレイアウト エンジンによって処理されていた UIElement を返します。Returns a UIElement that was being processed by the layout engine at the moment of an unhandled exception.

GetLayoutSlot(FrameworkElement)

子要素用に予約されているレイアウト パーティションを表す Rect を返します。Returns a Rect that represents the layout partition that is reserved for a child element.

適用対象