Class FrameworkElementExtensions
Provides extension methods for the FrameworkElement class.
Namespace: Celestial.UIToolkit.Extensions
Assembly: Celestial.UIToolkit.Core.dll
Syntax
public static class FrameworkElementExtensions
Methods
| Improve this Doc View SourceGetCenter(FrameworkElement)
Returns a Point which represents the element's center.
Declaration
public static Point GetCenter(this FrameworkElement frameworkElement)
Parameters
Type | Name | Description |
---|---|---|
FrameworkElement | frameworkElement | The FrameworkElement. |
Returns
Type | Description |
---|---|
Point | A Point instance, pointing to the element's center. |
IsPointInControlBounds(FrameworkElement, Point)
Returns a value indicating whether the specified point is inside the element's bounds.
Declaration
public static bool IsPointInControlBounds(this FrameworkElement frameworkElement, Point point)
Parameters
Type | Name | Description |
---|---|---|
FrameworkElement | frameworkElement | The FrameworkElement. |
Point | point | A point which may or may not be inside the bounds of the element. The point is expected to be relative to the element, meaning that (0; 0) points to the element's top-left corner. |
Returns
Type | Description |
---|---|
Boolean |
|