Aligns a UIElement instance within a given rectangle, and based on a specific size.

C# | Visual Basic | Visual C++ |
public static void AlignVisualBounds( UIElement visual, Size size, Rect rect, AlignmentX alignX, AlignmentY alignY )
Public Shared Sub AlignVisualBounds ( _ visual As UIElement, _ size As Size, _ rect As Rect, _ alignX As AlignmentX, _ alignY As AlignmentY _ )
public: static void AlignVisualBounds( UIElement^ visual, Size size, Rect rect, AlignmentX alignX, AlignmentY alignY )

- visual (UIElement)
- The visual to align
- size (Size)
- The logical size of the visual
- alignX (AlignmentX)
- The horizontal alignment within the rectangle
- alignY (AlignmentY)
- The vertical alignment within the rectangle