다음을 통해 공유


ExtensionMethods Members

Include Protected Members
Include Inherited Members

The ExtensionMethods type exposes the following members.

Methods

  Name Description
Public methodStatic member AcquireWin32Focus Puts the Win32 focus to the HWND of the HwndSource of the DependencyObject provided. If a new HWND other than currently focused one is focused then it returns true, setting the previousFocus parameter to the previously focused HWND and it returns false otherwise.
Public methodStatic member CopyTo Add a simple copy method to Stream
Public methodStatic member FindAncestor<TAncestorType>(DependencyObject) Helper method that finds the first ancestor of a given Type in the logical or visual tree.
Public methodStatic member FindAncestor<TAncestorType, TElementType>(TElementType, Func<T, TResult>)
Public methodStatic member FindAncestorOrSelf<TAncestorType> Helper method that finds the first ancestor of a given Type in the logical or visual tree, or the object itself if it matches in type.
Public methodStatic member FindCommonAncestor(DependencyObject, DependencyObject) Finds the common ancestor of obj1 and obj2 using the GetVisualOrLogicalParent as the parent evaluation method.
Public methodStatic member FindCommonAncestor<T>(T, T, Func<T, TResult>)
Public methodStatic member FindDescendant<T> Helper method that finds the first descendant of a given Type in the visual tree. USE SPARINGLY. This method walks all the tree until a result is found. Use of this method on large trees or excessively will introduce a performance hit.
Public methodStatic member FindDescendants<T> Find all visual descendants of this dependency object of a particular type. USE SPARINGLY. This method walks the entire tree. Use of this method on large trees or excessively will introduce a performance hit.
Public methodStatic member FindDescendantsReverse<T> In reverse order: Find all visual descendants of this dependency object of a particular type. USE SPARINGLY. This method walks the entire tree. Use of this method on large trees or excessively will introduce a performance hit.
Public methodStatic member GetVisualOrLogicalParent This uses the visual tree first, then diverts to the logical tree if the visual tree ends. This is necessary for the TabControl, where using either the logical tree or visual tree by themselves is insufficient.
Public methodStatic member IsAncestorOf<TElementType>
Public methodStatic member IsConnectedToPresentationSource Used to determine if a given DependencyObject is rooted in a PresentationSource. In order to determine screen coordinates from relative coordinates, this element has to be rooted in a PresentationSource. It can also tell us whether something is presently in the visual tree or not.
Public methodStatic member IsLogicalAncestorOf Determines if an element is an ancestor of another element using both the logical and visual trees.
Public methodStatic member IsNearlyEqual Helper method to determine if a double is the same type of non-real or nearly equal to another double.
Public methodStatic member IsNonreal Helper method to check if a double is valid.
Public methodStatic member IsSignificantlyGreater
Public methodStatic member IsTopmost Determines if an HWND is a topmost window.
Public methodStatic member RaiseEvent(EventHandler, Object) Helper method to perform the null check necessary to raise an event safely.
Public methodStatic member RaiseEvent(CancelEventHandler, Object, CancelEventArgs) Helper method to perform the null check necessary to raise an event safely.
Public methodStatic member RaiseEvent(EventHandler, Object, EventArgs) Helper method to perform the null check necessary to raise an event safely.
Public methodStatic member RaiseEvent<TEventArgs>(EventHandler<TEventArgs>, Object, TEventArgs) Helper method to perform the null check necessary to raise an event safely.
Public methodStatic member ThrowIfNullOrEmpty Add a throw from string to verify that it is not null or empty
Public methodStatic member ToPOINTL Converts a given Point object to a POINTL.
Public methodStatic member TraverseVisualTree<T> Execute a delegate action on all visual descendants of this dependency object of a particular type. USE SPARINGLY. This method walks the entire tree. Use of this method on large trees or excessively will introduce a performance hit.
Public methodStatic member TraverseVisualTreeReverse<T>

Top

See Also

Reference

ExtensionMethods Class

Microsoft.VisualStudio.PlatformUI Namespace