Skip to end of metadata
Go to start of metadata

Represents the master detail view controller with built-in MVVM and data binding support.

Definition

public class UIMasterDetailViewController<TMasterViewModel> : UISplitViewController,

IMasterDetailViewController, INavigationContext, IViewNotification, IViewModelInitializer,

IServiceAccessor, IContainerViewController

where TMasterViewModel : IViewModel, class

Type Parameters

TMasterViewModel

Summary

The following table summarizes the members exposed in this class.

Public Constructors

Public Properties

DetailViewController Gets the detail view controller.
DetailViewControllerType Gets the type of the detail view controller.
IsActive Gets or sets a value indicating whether this instance is active.
MasterButtonDisplayMemberPath Gets the master button display member path.
MasterViewController Gets the master view controller.
MasterViewControllerType Gets the type of the master view controller.
MasterViewModel Gets the master view model.

Protected Properties

DetailViewController Gets the detail view controller.
DetailViewControllerType Gets the type of the detail view controller.
EnsureNavigationContext Gets a value indicating whether the navigation context should be made available to the child view controller during navigation.
LoadedFromNib Gets or sets a value indicating whether this UIMasterDetailViewController<TMasterViewModel> loaded from nib.
MasterViewController Gets the master view controller.
MasterViewControllerType Gets the type of the master view controller.
SelectionDetailType Gets the type of the selection detail.

Public Methods

AddBinding(UIView, BindableProperty, BindingDescription) Adds binding to the target view.
AddBinding(UIView, BindableProperty, string) Adds binding to the target view with the specified path.
AddBinding(UIView, BindableProperty, string, BindingMode) Adds binding to the target view with the specified path and mpode.
AddBinding(string, BindableProperty, BindingDescription) Adds binding to the target view with the specified binding description.
AddBinding(string, BindableProperty, string) Adds binding to the target view name with the specified path.
AddBinding(string, BindableProperty, string, BindingMode) Adds binding to the target view name with the specified path and mode.
DetermineNavigationMode(NavigationParameter) Determines the navigation mode based on the given parameter.
DidReceiveMemoryWarning() Called when the system is running low on memory.
FindName(string) Finds a view with the specified name.
FindName<T>(string) Finds a view with the specified name.
GetService<TService>() Gets the registered service based on the specified type parameter.
GetService<TService>(bool) Gets the service and optionally return a new instance of the service.
IsDetailViewControllerOfType(Type) Determines whether the detail view controller is of the specified type.
IsMasterViewControllerOfType(Type) Determines whether the master view controller is of the specified type.
RegisterViewIdentifier(string, NSObject) Registers the specified identifier to the view.
SetDetailViewController(UIViewController, bool) Sets the detail view controller.
SetDetailViewController(UIViewController, bool, bool) Sets the detail view controller.
SetInitialSelection(NSIndexPath, bool) Sets the initial selection for the master view.
ShouldAutorotate() Determines if the view should be automatically rotated.
SynchronizeSelection(bool) Synchronizes the selection between the selected item and the corresponding view.
ValueForKey(NSString) Gets the value of the associated key.
ValueForUndefinedKey(NSString) Called when the given key is undefined.
ViewDidAppear(bool) Called when the view has become visible.
ViewDidLoad() Called when the view is loaded to the view controller.

Protected Methods

Dispose(bool) Dispose this instance.
InitializeBindings() Called when the bindings are being initialized.
InitializeView() Called when the view is in initialization cycle.
InitializeViewControllers() Called when the child view controllers are initialized.
InitializeViewModel() Called when the view model is being initialized.
OnViewCreated() Called when the view is created.
OnViewDismissed(NavigationResult) Called when the view is dismissed.
OnViewDisposed() Called when the view is disposed.
OnViewInitialized() Called when the view has been completely initialized.

Events

ViewDismissed Occurs when view dismissed.

Public Constructors

public UIMasterDetailViewController()

Initializes a new instance of the UIMasterDetailViewController<TMasterViewModel> class.

public UIMasterDetailViewController(IntPtr handle)

Initializes a new instance of the UIMasterDetailViewController<TMasterViewModel> class.

Parameters

handle Handle.

public UIMasterDetailViewController(TMasterViewModel masterViewModel)

Initializes a new instance of the UIMasterDetailViewController<TMasterViewModel> class.

Parameters

masterViewModel Master view model.

public UIMasterDetailViewController(string nibName, NSBundle bundle)

Initializes a new instance of the UIMasterDetailViewController<TMasterViewModel> class.

Parameters

nibName Nib name.
bundle Bundle.

Public Properties

public UIViewController DetailViewController { get; }

Gets the detail view controller.

public Type DetailViewControllerType { get; }

Gets the type of the detail view controller.

public bool IsActive { get; }

Gets or sets a value indicating whether this instance is active.

public string MasterButtonDisplayMemberPath { get; }

Gets the master button display member path.

public UIViewController MasterViewController { get; }

Gets the master view controller.

public Type MasterViewControllerType { get; }

Gets the type of the master view controller.

public TMasterViewModel MasterViewModel { get; }

Gets the master view model.

Protected Properties

protected UIViewController DetailViewController { set; }

Gets the detail view controller.

protected Type DetailViewControllerType { set; }

Gets the type of the detail view controller.

protected bool EnsureNavigationContext { get; }

Gets a value indicating whether the navigation context should be made available to the child view controller during navigation.

protected bool LoadedFromNib { get; set; }

Gets or sets a value indicating whether this UIMasterDetailViewController<TMasterViewModel> loaded from nib.

protected UIViewController MasterViewController { set; }

Gets the master view controller.

protected Type MasterViewControllerType { set; }

Gets the type of the master view controller.

protected Type SelectionDetailType { get; }

Gets the type of the selection detail.

Public Methods

public void AddBinding(UIView targetView, BindableProperty property, BindingDescription binding)

Adds binding to the target view.

Parameters

targetView Target view.
property Property.
binding Binding.

public void AddBinding(UIView targetView, BindableProperty property, string path)

Adds binding to the target view with the specified path.

Parameters

targetView Target view.
property Property.
path Path.

public void AddBinding(UIView targetView, BindableProperty property, string path, BindingMode mode)

Adds binding to the target view with the specified path and mpode.

Parameters

targetView Target view.
property Property.
path Path.
mode Mode.

public void AddBinding(string targetViewName, BindableProperty property, BindingDescription binding)

Adds binding to the target view with the specified binding description.

Parameters

targetViewName Target view name.
property Property.
binding Binding.

public void AddBinding(string targetViewName, BindableProperty property, string path)

Adds binding to the target view name with the specified path.

Parameters

targetViewName Target view name.
property Property.
path Path.

public void AddBinding(string targetViewName, BindableProperty property, string path, BindingMode mode)

Adds binding to the target view name with the specified path and mode.

Parameters

targetViewName Target view name.
property Property.
path Path.
mode Mode.

public void DetermineNavigationMode(NavigationParameter parameter)

Determines the navigation mode based on the given parameter.

Parameters

parameter Navigation parameter.

public void DidReceiveMemoryWarning()

Called when the system is running low on memory.

public object FindName(string name)

Finds a view with the specified name.

Parameters

name Name.

Return Types

The name.

public T FindName<T>(string name)

Finds a view with the specified name.

Type Parameters

T The 1st type parameter.

Parameters

name Name.

Return Types

The name.

public TService GetService<TService>()

Gets the registered service based on the specified type parameter.

Type Parameters

TService The service type to retrieve.

Return Types

The service.

public TService GetService<TService>(bool newInstance)

Gets the service and optionally return a new instance of the service.

Type Parameters

TService The 1st type parameter.

Parameters

newInstance If set to true new instance.

Return Types

The service.

public bool IsDetailViewControllerOfType(Type detailViewControllerType)

Determines whether the detail view controller is of the specified type.

Parameters

detailViewControllerType Detail view controller type.

Return Types

true

public bool IsMasterViewControllerOfType(Type masterViewControllerType)

Determines whether the master view controller is of the specified type.

Parameters

masterViewControllerType Master view controller type.

Return Types

true

public void RegisterViewIdentifier(string id, NSObject view)

Registers the specified identifier to the view.

Parameters

id Identifier.
view View.

public void SetDetailViewController(UIViewController targetViewController, bool isAnimated)

Sets the detail view controller.

Parameters

targetViewController Target view controller.
isAnimated If set to true is animated.

public void SetDetailViewController(UIViewController targetViewController, bool isAnimated, bool autoDisposeViewController)

Sets the detail view controller.

Parameters

targetViewController Target view controller.
isAnimated If set to true is animated.
autoDisposeViewController If set to true auto dispose view controller.

public void SetInitialSelection(NSIndexPath index, bool isProgrammatic)

Sets the initial selection for the master view.

Parameters

index Index.
isProgrammatic If set to true is programmatic.

public bool ShouldAutorotate()

Determines if the view should be automatically rotated.

Return Types

true, if the view should auto rotate, false otherwise.

public void SynchronizeSelection(bool animated)

Synchronizes the selection between the selected item and the corresponding view.

Parameters

animated If set to true animated.

public NSObject ValueForKey(NSString key)

Gets the value of the associated key.

Parameters

key Key.

Return Types

The object corresponding to the given key.

public NSObject ValueForUndefinedKey(NSString key)

Called when the given key is undefined.

Parameters

key Key.

public void ViewDidAppear(bool animated)

Called when the view has become visible.

Parameters

animated If set to true animated.

public void ViewDidLoad()

Called when the view is loaded to the view controller.

Protected Methods

protected void Dispose(bool disposing)

Dispose this instance.

Parameters

disposing If set to true disposing.

protected void InitializeBindings()

Called when the bindings are being initialized.

protected void InitializeView()

Called when the view is in initialization cycle.

protected void InitializeViewControllers()

Called when the child view controllers are initialized.

protected void InitializeViewModel()

Called when the view model is being initialized.

protected void OnViewCreated()

Called when the view is created.

protected void OnViewDismissed(NavigationResult result)

Called when the view is dismissed.

Parameters

result Result.

protected void OnViewDisposed()

Called when the view is disposed.

protected void OnViewInitialized()

Called when the view has been completely initialized.

Events

public event EventHandler<DismissViewEventArgs> ViewDismissed

Occurs when view dismissed.

  • No labels