Share via


LayoutInformation Sınıf

Tanım

Bir öğenin düzen durumu hakkında ek bilgi sağlayan yöntemleri tanımlar.

public ref class LayoutInformation abstract sealed
public static class LayoutInformation
type LayoutInformation = class
Public Class LayoutInformation
Devralma
LayoutInformation

Örnekler

Aşağıdaki örnekte, yöntemini kullanarak öğesinin GetLayoutSlot sınırlayıcı kutusunu içine çevirme işleminin nasıl kullanılacağı gösterilmektedir 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

Yöntemler

GetLayoutClip(FrameworkElement)

Bir Geometry öğenin görünür bölgesini temsil eden bir döndürür.

GetLayoutExceptionElement(Dispatcher)

İşlenmeyen bir UIElement özel durum anında düzen altyapısı tarafından işlenen bir döndürür.

GetLayoutSlot(FrameworkElement)

Bir Rect alt öğe için ayrılmış düzen bölümünü temsil eden bir döndürür.

Şunlara uygulanır