Table of Contents

Interface IWpfAppBuilder

Namespace
Tudormobile.Wpf
Assembly
Tudormobile.WpfApp.dll

Defines a class that provides the mechanisms to configure and manage a Wpf application.

public interface IWpfAppBuilder : IBuilder<IWpfApp>
Inherited Members
Extension Methods

Properties

HostBuilder

Host builder

IHostBuilder HostBuilder { get; }

Property Value

IHostBuilder

Methods

AddHosting(bool)

Use Host container.

IWpfAppBuilder AddHosting(bool useHosting = true)

Parameters

useHosting bool

True to add hosting; use false to remove hosting.

Returns

IWpfAppBuilder

Fluent reference to the builder.

AddMainWindow<T>()

Adds a class to represent the Main Window of the application.

IWpfAppBuilder AddMainWindow<T>() where T : Window

Returns

IWpfAppBuilder

Fluent reference to the builder.

Type Parameters

T

Type of main window.

AddService<TServiceInterface, TServiceClass>(bool)

Adds a service to the container.

IWpfAppBuilder AddService<TServiceInterface, TServiceClass>(bool isSingleton = true) where TServiceInterface : IWpfAppService where TServiceClass : class

Parameters

isSingleton bool

True if service is a singleton.

Returns

IWpfAppBuilder

Fluent reference to the builder.

Type Parameters

TServiceInterface

Service interface.

TServiceClass

Service implementation.

AddView<TView, TViewModel>()

Adds a View and associated ViewModel to the application container.

IWpfAppBuilder AddView<TView, TViewModel>() where TView : FrameworkElement where TViewModel : class

Returns

IWpfAppBuilder

Fluent reference to the builder.

Type Parameters

TView

Type of the view object.

TViewModel

Type of the View Model object.

AddWindow<TView, TViewModel>()

Adds a Window and associated View Model to the application container.

IWpfAppBuilder AddWindow<TView, TViewModel>() where TView : Control where TViewModel : class

Returns

IWpfAppBuilder

Fluent reference to the builder.

Type Parameters

TView
TViewModel