FrameworkElementExtensions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public static class FrameworkElementExtensions
type FrameworkElementExtensions = class
Public Module FrameworkElementExtensions
- Inheritance
-
FrameworkElementExtensions
Fields
ActualHeightProperty |
Attached Windows.UI.Xaml.DependencyProperty for binding a Double for the Windows.UI.Xaml.FrameworkElement.ActualHeight |
ActualWidthProperty |
Attached Windows.UI.Xaml.DependencyProperty for binding a Double for the Windows.UI.Xaml.FrameworkElement.ActualWidth |
AncestorProperty |
Attached Windows.UI.Xaml.DependencyProperty for retrieving a parent Object for the AncestorProperty |
AncestorTypeProperty |
Attached Windows.UI.Xaml.DependencyProperty for retrieving a parent Object for the AncestorProperty based on the provided Type in the AncestorTypeProperty. |
CursorProperty |
Dependency property for specifying the target Windows.UI.Core.CoreCursorType to be shown over the target Windows.UI.Xaml.FrameworkElement. |
EnableActualSizeBindingProperty |
Attached Windows.UI.Xaml.DependencyProperty for enabling actual size binding on any Windows.UI.Xaml.FrameworkElement. |
Attached Properties
ActualHeight | |
ActualWidth | |
Ancestor | |
AncestorType | |
Cursor | |
EnableActualSizeBinding |
Methods
FindChild(FrameworkElement, String, StringComparison) |
Find the first child of type Windows.UI.Xaml.FrameworkElement with a given name, using a depth-first search. |
FindChild(FrameworkElement, Type) |
Find the first child element of a given type, using a depth-first search. |
FindChild<T,TState>(FrameworkElement, TState, Func<T,TState,Boolean>) |
Find the first child element matching a given predicate, using a depth-first search. |
FindChild<T>(FrameworkElement, Func<T,Boolean>) |
Find the first child element matching a given predicate, using a depth-first search. |
FindChild<T>(FrameworkElement) |
Find the first child element of a given type, using a depth-first search. |
FindChildOrSelf(FrameworkElement, String, StringComparison) |
Find the first child (or self) of type Windows.UI.Xaml.FrameworkElement with a given name, using a depth-first search. |
FindChildOrSelf(FrameworkElement, Type) |
Find the first child (or self) element of a given type, using a depth-first search. |
FindChildOrSelf<T,TState>(FrameworkElement, TState, Func<T,TState,Boolean>) |
Find the first child (or self) element matching a given predicate, using a depth-first search. |
FindChildOrSelf<T>(FrameworkElement, Func<T,Boolean>) |
Find the first child (or self) element matching a given predicate, using a depth-first search. |
FindChildOrSelf<T>(FrameworkElement) |
Find the first child (or self) element of a given type, using a depth-first search. |
FindChildren(FrameworkElement) |
Find all logical child elements of the specified element. This method can be chained with LINQ calls to add additional filters or projections on top of the returned results. This method is meant to provide extra flexibility in specific scenarios and it should not be used when only the first item is being looked for. In those cases, use one of the available FindChild<T>(FrameworkElement) overloads instead, which will offer a more compact syntax as well as better performance in those cases. |
FindParent(FrameworkElement, String, StringComparison) |
Find the first parent of type Windows.UI.Xaml.FrameworkElement with a given name. |
FindParent(FrameworkElement, Type) |
Find the first parent element of a given type. |
FindParent<T,TState>(FrameworkElement, TState, Func<T,TState,Boolean>) |
Find the first parent element matching a given predicate. |
FindParent<T>(FrameworkElement, Func<T,Boolean>) |
Find the first parent element matching a given predicate. |
FindParent<T>(FrameworkElement) |
Find the first parent element of a given type. |
FindParentOrSelf(FrameworkElement, String, StringComparison) |
Find the first parent (or self) of type Windows.UI.Xaml.FrameworkElement with a given name. |
FindParentOrSelf(FrameworkElement, Type) |
Find the first parent (or self) element of a given type. |
FindParentOrSelf<T,TState>(FrameworkElement, TState, Func<T,TState,Boolean>) |
Find the first parent (or self) element matching a given predicate. |
FindParentOrSelf<T>(FrameworkElement, Func<T,Boolean>) |
Find the first parent (or self) element matching a given predicate. |
FindParentOrSelf<T>(FrameworkElement) |
Find the first parent (or self) element of a given type. |
FindParents(FrameworkElement) |
Find all parent elements of the specified element. This method can be chained with LINQ calls to add additional filters or projections on top of the returned results. This method is meant to provide extra flexibility in specific scenarios and it should not be used when only the first item is being looked for. In those cases, use one of the available FindParent<T>(FrameworkElement) overloads instead, which will offer a more compact syntax as well as better performance in those cases. |
FindResource(FrameworkElement, Object) |
Provides a WPF compatible version of FindResource to provide a static resource lookup. If the key is not found in the current element's resources, the logical tree is then searched element-by-element to look for the resource in each element's resources. If none of the elements contain the resource, the Application's resources are then searched. See: https://docs.microsoft.com/dotnet/api/system.windows.frameworkelement.findresource. |
GetActualHeight(FrameworkElement) |
Gets the Double for the Windows.UI.Xaml.FrameworkElement.ActualHeight |
GetActualWidth(FrameworkElement) |
Gets the Double for the Windows.UI.Xaml.FrameworkElement.ActualWidth |
GetAncestor(DependencyObject) |
Retrieves the parent object of this framework element found of the given AncestorTypeProperty. |
GetAncestorType(DependencyObject) |
Gets the Type of Ancestor to look for from this element. |
GetContentControl(FrameworkElement) |
Gets the content property of this element as defined by Windows.UI.Xaml.Markup.ContentPropertyAttribute, if available. |
GetCursor(FrameworkElement) |
Get the current Windows.UI.Core.CoreCursorType. |
GetEnableActualSizeBinding(FrameworkElement) |
Gets the Boolean that enables/disables actual size binding update. |
SetActualHeight(FrameworkElement, Double) |
Sets the Double for the Windows.UI.Xaml.FrameworkElement.ActualHeight |
SetActualWidth(FrameworkElement, Double) |
Sets the Double for the Windows.UI.Xaml.FrameworkElement.ActualWidth |
SetAncestor(DependencyObject, Object) |
Sets the parent object of the framework element (internal). |
SetAncestorType(DependencyObject, Type) |
Sets the Type to look for from this element and place in the AncestorProperty. |
SetCursor(FrameworkElement, CoreCursorType) |
Set the target Windows.UI.Core.CoreCursorType. |
SetEnableActualSizeBinding(FrameworkElement, Boolean) |
Sets the Boolean that enables/disables actual size binding update. |
TryFindResource(FrameworkElement, Object, Object) |
Provides a WPF compatible version of TryFindResource to provide a static resource lookup. If the key is not found in the current element's resources, the logical tree is then searched element-by-element to look for the resource in each element's resources. If none of the elements contain the resource, the Application's resources are then searched. See: https://docs.microsoft.com/dotnet/api/system.windows.frameworkelement.tryfindresource. |
TryFindResource(FrameworkElement, Object) |
Provides a WPF compatible version of TryFindResource to provide a static resource lookup. If the key is not found in the current element's resources, the logical tree is then searched element-by-element to look for the resource in each element's resources. If none of the elements contain the resource, the Application's resources are then searched. See: https://docs.microsoft.com/dotnet/api/system.windows.frameworkelement.tryfindresource. |