LayoutInformation Class
.NET Framework 3.0
Defines methods that provide additional information about the layout state of an element. This is an abstract class. This class cannot be inherited.
Namespace: System.Windows.Controls.Primitives
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
The following example demonstrates how to use the GetLayoutSlot method to translate the bounding box of a FrameworkElement into a GeometryDrawing.
Public Sub getLayoutSlot1(ByVal sender As Object, ByVal e As RoutedEventArgs) Dim myRectangleGeometry As New RectangleGeometry myRectangleGeometry.Rect = LayoutInformation.GetLayoutSlot(txt1) Dim myGeometryDrawing As New GeometryDrawing 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
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: