public class ViewHost : Decorator Presents plain borrowed content through view location or an implicit WPF DataTemplate.
Remarks
The host creates a fresh presentation when content changes or the host reloads. It never owns or disposes content, creates navigation entries, or changes navigation. Its Child is managed by the host. The host's ViewLocator is asked first, then the locator from Services, then implicit WPF templates. Entry-specific locators can implement the plain-content overload for use with this host.
Constructors
ViewHost
public ViewHost() Creates a plain-content view host.
Fields
ContentProperty
public static readonly DependencyProperty ContentProperty Identifies the Content dependency property.
ServicesProperty
public static readonly DependencyProperty ServicesProperty Identifies the Services dependency property.
ViewLocatorProperty
public static readonly DependencyProperty ViewLocatorProperty Identifies the ViewLocator dependency property.
Properties
Content
public object? Content { get; set; } Gets or sets the borrowed content to present.
Services
public IServiceProvider? Services { get; set; } Gets or sets the provider for registered view location and view construction.
Remarks
The caller owns this provider. Without one, only the explicit locator and implicit templates are available.
ViewLocator
public INavigationViewLocator? ViewLocator { get; set; } Gets or sets the locator asked first for a plain-content view.