Contains extension methods for FrameworkElement.
More...
|
static void | SetInteractor (this FrameworkElement element, WpfInteractor interactor) |
| Attaches an interactor to this FrameworkElement. More...
|
|
static WpfInteractor | GetInteractor (this FrameworkElement self) |
| Gets the interactor for this FrameworkElement. More...
|
|
static FrameworkElement | GetParent (this FrameworkElement self) |
| Gets the parent for this FrameworkElement More...
|
|
static IEnumerable< FrameworkElement > | GetAncestors (this FrameworkElement self, bool includeSelf=false) |
| Gets all ancestors for this FrameworkElement. More...
|
|
static FrameworkElement | FindAncestor (this FrameworkElement self, Func< FrameworkElement, bool > condition) |
| Find the first ancestor for this FrameworkElement which meets the supplied condition. More...
|
|
static TElement | FindAncestor< TElement > (this FrameworkElement self) |
| Find the first ancestor to this FrameworkElement of type TElement. More...
|
|
static FrameworkElement | GetTopLevelElement (this FrameworkElement self) |
| Gets the top level framework element for this FrameworkElement. More...
|
|
static Window | GetTopLevelWindow (this FrameworkElement self) |
| Gets the top level window for this FrameworkElement. More...
|
|
static IntPtr | GetWindowHandle (this FrameworkElement element) |
| Gets the window handle for this FrameworkElement. More...
|
|
Contains extension methods for FrameworkElement.
◆ SetInteractor()
static void SetInteractor |
( |
this FrameworkElement |
element, |
|
|
WpfInteractor |
interactor |
|
) |
| |
|
inlinestatic |
Attaches an interactor to this FrameworkElement.
- Parameters
-
element | The framework element. |
interactor | The interactor. |
◆ GetInteractor()
Gets the interactor for this FrameworkElement.
- Parameters
-
self | The framework element to get the interactor for. |
- Returns
- An interactor, or
null
if not found.
◆ GetParent()
static FrameworkElement GetParent |
( |
this FrameworkElement |
self | ) |
|
|
inlinestatic |
Gets the parent for this FrameworkElement
- Parameters
-
self | The framework element. |
- Returns
- The parent framework element.
◆ GetAncestors()
static IEnumerable<FrameworkElement> GetAncestors |
( |
this FrameworkElement |
self, |
|
|
bool |
includeSelf = false |
|
) |
| |
|
inlinestatic |
Gets all ancestors for this FrameworkElement.
- Parameters
-
self | The framework element. |
includeSelf | Whether to include this framework element as an ancestor. |
- Returns
- The found ancestor framework elements.
◆ FindAncestor()
static FrameworkElement FindAncestor |
( |
this FrameworkElement |
self, |
|
|
Func< FrameworkElement, bool > |
condition |
|
) |
| |
|
inlinestatic |
Find the first ancestor for this FrameworkElement which meets the supplied condition.
- Parameters
-
self | The framework element. |
condition | The condition for finding ancestors. |
- Returns
- The found ancestor.
◆ FindAncestor< TElement >()
static TElement FindAncestor< TElement > |
( |
this FrameworkElement |
self | ) |
|
|
inlinestatic |
Find the first ancestor to this FrameworkElement of type TElement.
- Template Parameters
-
TElement | The type of the sought ancestor. |
- Parameters
-
self | The framework element. |
- Returns
- The found ancestor.
- Type Constraints
-
TElement | : | FrameworkElement | |
◆ GetTopLevelElement()
static FrameworkElement GetTopLevelElement |
( |
this FrameworkElement |
self | ) |
|
|
inlinestatic |
Gets the top level framework element for this FrameworkElement.
- Parameters
-
self | The framework element. |
- Returns
- The top level framework element.
◆ GetTopLevelWindow()
static Window GetTopLevelWindow |
( |
this FrameworkElement |
self | ) |
|
|
inlinestatic |
Gets the top level window for this FrameworkElement.
- Parameters
-
self | The framework element. |
- Returns
- The top level window.
◆ GetWindowHandle()
static IntPtr GetWindowHandle |
( |
this FrameworkElement |
element | ) |
|
|
inlinestatic |
Gets the window handle for this FrameworkElement.
- Parameters
-
element | The framework element. |
- Returns
- The window handle.
◆ InteractorProperty
readonly DependencyProperty InteractorProperty |
|
static |
Initial value:= DependencyProperty.RegisterAttached(
"Interactor", typeof(WpfInteractor),
typeof(WpfInteractor),
new PropertyMetadata(default(WpfInteractor)))
The interactor dependency property.
The documentation for this class was generated from the following file:
- FrameworkElementExtensions.cs