Skip to content

ViewModelRoutedViewHost.OnApplyTemplate() method

Defined in

Type: ViewModelRoutedViewHost Namespace: CrissCross.WPF Assembly: CrissCross.WPF.dll

Applies to

net10.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net481

public override void OnApplyTemplate()

View source

Inherited documentation

These docs were inherited from TransitioningContentControl. The member doesn't override them on this type.

Remarks

When the template is applied, the control locates and caches the required template parts and the visual state group used for transitions.

The following parts are required: PART_Container and PART_CurrentContentPresentationSite. If either is missing, an InvalidOperationException is thrown.

The PART_PreviousImageSite part is optional; if it is missing, transitions will not run and the control behaves like a normal ContentControl.

Exceptions

TypeCondition
System.InvalidOperationExceptionThrown if PART_Container or PART_CurrentContentPresentationSite cannot be found in the applied template.