IVisualTreeServiceCallback::OnVisualTreeChange method (xamlom.h)

Communicates the state of the visual tree when it changes.

Syntax

HRESULT OnVisualTreeChange(
  [in] ParentChildRelation relation,
  [in] VisualElement       element,
  [in] VisualMutationType  mutationType
);

Parameters

[in] relation

The association of a parent object with a child object.

[in] element

The XAML element in the visual tree.

[in] mutationType

A value that indicates whether the change was an add or remove.

Return value

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

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

IVisualTreeServiceCallback