• HOME
  • PRODUCTS
  • DEMOS
  • BUY
  • BLOG
  • FORUM
  • DOCUMENTATION
  • ABOUT
  • FREE EVALUATION
Search Results for

    Show / Hide Table of Contents

    TryFindChild Method

    TryFindChild<T>(DependencyObject)

    Returns the first child of the specified type found in the visual tree.

    Declaration
    public static T TryFindChild<T>(this DependencyObject parent)
        where T : DependencyObject
    Parameters
    Type Name Description
    DependencyObject parent

    The parent element where the search is started.

    Returns
    Type Description
    T

    The first child of the specified type found in the visual tree, or null if no parent of the specified type is found.

    Type Parameters
    Name Description
    T

    TryFindChild<T>(DependencyObject, String)

    Returns the first child of the specified type and with the specified name found in the visual tree.

    Declaration
    public static T TryFindChild<T>(this DependencyObject parent, string childName)
        where T : DependencyObject
    Parameters
    Type Name Description
    DependencyObject parent

    The parent element where the search is started.

    String childName

    The name of the child element to find, or an empty string or null to only look at the type.

    Returns
    Type Description
    T

    The first child that matches the specified type and child name, or null if no match is found.

    Type Parameters
    Name Description
    T
    In This Article
    Back to top Copyright AlterNET Software Download PDF