[]
Returns a DependencyObject value that represents the parent of the visual object of the specified type. Method looks up the visual tree until the desired parent element is found or parent element is null.
public static DependencyObject GetParentOfType(DependencyObject reference, Type type)
Type | Name | Description |
---|---|---|
DependencyObject | reference | The visual whose parent is returned. |
Type | type | The Type of the parent element to search for. |
Type | Description |
---|---|
DependencyObject | The parent of the visual. |
Returns a DependencyObject value that represents the parent of the visual object of the specified type. Method looks up the visual tree until the desired parent element is found or parent element is equal to the specified endObject.
public static DependencyObject GetParentOfType(DependencyObject reference, Type type, DependencyObject endObject)
Type | Name | Description |
---|---|---|
DependencyObject | reference | The visual whose parent is returned. |
Type | type | The Type of the parent element to search for. |
DependencyObject | endObject | The visual representing the end point of search. |
Type | Description |
---|---|
DependencyObject | The parent of the visual. |
Returns a DependencyObject value that represents the parent of the visual object of the specified type. Method looks up the visual tree until the desired parent element is found or parent element is null.
public static DependencyObject GetParentOfType(DependencyObject reference, Type type, bool lookOutsideVisualTree)
Type | Name | Description |
---|---|---|
DependencyObject | reference | The visual whose parent is returned. |
Type | type | The Type of the parent element to search for. |
bool | lookOutsideVisualTree | Specifies whether the search should go on outside the VisualTree. |
Type | Description |
---|---|
DependencyObject | The parent of the visual. |
Returns a DependencyObject value that represents the parent of the visual object of the specified type. Method looks up the visual tree until the desired parent element is found or parent element is equal to the specified endObject.
public static DependencyObject GetParentOfType(DependencyObject reference, Type type, DependencyObject endObject, bool lookOutsideVisualTree)
Type | Name | Description |
---|---|---|
DependencyObject | reference | The visual whose parent is returned. |
Type | type | The Type of the parent element to search for. |
DependencyObject | endObject | The visual representing the end point of search. |
bool | lookOutsideVisualTree | Specifies whether the search should go on outside the VisualTree. |
Type | Description |
---|---|
DependencyObject | The parent of the visual. |