IVisualTreeService::ClearChildren method (xamlom.h)

Clears all child elements from the parent collection.

Syntax

HRESULT ClearChildren(
  [in] InstanceHandle parent
);

Parameters

[in] parent

A handle to the collection object.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

For any collection method, the caller should query the properties of a known element and should only call this method if the property has MetadataBit::IsValueCollectionset.

Requirements

Requirement Value
Minimum supported client Windows 10 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header xamlom.h

See also

IVisualTreeService