Share via


ModelParent.FindParent Method (EditingContext, Type, ModelItem)

Finds a viable parent for the specified type of child and editing context.

Namespace:  Microsoft.Windows.Design.Model
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Public Shared Function FindParent ( _
    context As EditingContext, _
    childType As Type, _
    startingItem As ModelItem _
) As ModelItem
public static ModelItem FindParent(
    EditingContext context,
    Type childType,
    ModelItem startingItem
)
public:
static ModelItem^ FindParent(
    EditingContext^ context, 
    Type^ childType, 
    ModelItem^ startingItem
)
static member FindParent : 
        context:EditingContext * 
        childType:Type * 
        startingItem:ModelItem -> ModelItem 
public static function FindParent(
    context : EditingContext, 
    childType : Type, 
    startingItem : ModelItem
) : ModelItem

Parameters

  • childType
    Type: System.Type
    The type of item you wish to parent.

Return Value

Type: Microsoft.Windows.Design.Model.ModelItem
An item that can accept an item of type childType, or nulla null reference (Nothing in Visual Basic) if no viable parent could be found.

.NET Framework Security

See Also

Reference

ModelParent Class

FindParent Overload

Microsoft.Windows.Design.Model Namespace

Other Resources

WPF Designer Extensibility Architecture