Show / Hide Table of Contents

Class FrameworkElementExtensions

Provides extension methods for the FrameworkElement class.

Inheritance
Object
FrameworkElementExtensions
Namespace: Celestial.UIToolkit.Extensions
Assembly: Celestial.UIToolkit.Core.dll
Syntax
public static class FrameworkElementExtensions

Methods

| Improve this Doc View Source

GetCenter(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.

| Improve this Doc View Source

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

true if the point is inside the element's bounds; false if not.

  • Improve this Doc
  • View Source
Back to top Copyright © 2018 Celestial.UIToolkit - Impressum