Class WpfApp
- Namespace
- Tudormobile.Wpf
- Assembly
- Tudormobile.WpfApp.dll
Wpf Application Container.
public class WpfApp : IWpfApp
- Inheritance
-
WpfApp
- Implements
- Inherited Members
Properties
CommandLine
Represents the command line and its arguments.
public ICommandLine CommandLine { get; }
Property Value
Current
The current WpfApp Application Host object.
public static IWpfApp? Current { get; set; }
Property Value
DialogService
Returns an instance of a dialog service.
public IDialogService DialogService { get; }
Property Value
Windows
Collection of application windows managed by the host.
public ObservableCollection<Window> Windows { get; }
Property Value
Methods
CreateBuilder()
Creates an instance of an IWpfAppBuilder.
public static IWpfAppBuilder CreateBuilder()
Returns
CreateView(Type, Type?)
Creates a view, view model, and sets the data context of the view to the view model.
public FrameworkElement CreateView(Type viewType, Type? viewModelType = null)
Parameters
Returns
CreateView<TView>()
Creates a view, view model, and sets the data context of the view to the view model.
public FrameworkElement CreateView<TView>() where TView : FrameworkElement
Returns
Type Parameters
TView
CreateView<TView, TViewModel>()
Creates a view, view model, and sets the data context of the view to the view model.
public FrameworkElement CreateView<TView, TViewModel>() where TView : FrameworkElement where TViewModel : class
Returns
Type Parameters
TView
TViewModel
CreateWindow<TView, TViewModel>()
Creates a new application window to be managed by the host.
public Window CreateWindow<TView, TViewModel>() where TView : Window where TViewModel : class
Returns
- Window
A reference to the created window.
Type Parameters
TView
The application window type.
TViewModel
The type of view model to use as the Data Context for the window.
Start()
Starts the application host.
public Task Start()
Returns
- Task
A Task that will be completed when the Host starts.
Start<T>()
Starts the application host.
public Task Start<T>() where T : Window
Returns
- Task
A Task that will be completed when the Host starts.
Type Parameters
T
Main Window type.