The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
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 void getLayoutSlot1(object sender, System.Windows.RoutedEventArgs e) { RectangleGeometry myRectangleGeometry = new RectangleGeometry(); myRectangleGeometry.Rect = LayoutInformation.GetLayoutSlot(txt1); GeometryDrawing myGeometryDrawing = new GeometryDrawing(); 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(); }
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
Show: