Skip to end of metadata
Go to start of metadata

Represents an advanced tab bar controller with built-in MVVM and data binding support.

Definition

public class UITabBarController<TViewModel> : UITabBarController,

INavigationContext, IViewNotification, IViewModelInitializer, IServiceAccessor,

IContainerViewController, ITabBarController

where TViewModel : IMultiPageViewModel, class

Type Parameters

TViewModel

Summary

The following table summarizes the members exposed in this class.

Public Constructors

Public Properties

IsActive Gets or sets a value indicating whether this instance is active.
ViewModel Gets the view model associated to this instance.

Protected Properties

EnsureNavigationContext Gets a value indicating whether this UITabBarController<TViewModel> should ensure navigation context.
LoadedFromNib Gets or sets a value indicating whether this UITabBarController<TViewModel> loaded from nib.

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.
RegisterViewIdentifier(string, NSObject) Registers the specified identifier to the view.
ValueForKey(NSString) Gets the value of the associated key.
ValueForUndefinedKey(NSString) Called when the given key is undefined.
ViewDidDisappear(bool) Called when the view has disappeared from the screen.
ViewDidLoad() Called when the view is loaded to the view controller.
ViewWillAppear(bool) Called when the view will appear to the screen.
ViewWillDisappear(bool) Called when the view is about to disappear from the screen.

Protected Methods

CreateViewModel() Called when the view model for this controller needs to be created.
Dispose(bool) Dispose this instance.
InitializeBindings() Called when the bindings are being initialized.
InitializeView() Called when the view is initialized.
InitializeViewControllers() Called when the view controllers for the tab items 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.
OnViewModelPropertyChanged(PropertyChangedEventArgs) Called when the properties of the associated ViewModel has changed.

Events

ViewDismissed Occurs when the view is dismissed.

Public Constructors

public UITabBarController()

Initializes a new instance of the UITabBarController<TViewModel> class.

public UITabBarController(IntPtr handle)

Initializes a new instance of the UITabBarController<TViewModel> class.

Parameters

handle Handle.

public UITabBarController(TViewModel viewModel)

Initializes a new instance of the UITabBarController<TViewModel> class.

Parameters

viewModel View model.

public UITabBarController(string nibName, NSBundle bundle)

Initializes a new instance of the UITabBarController<TViewModel> class.

Parameters

nibName Nib name.
bundle Bundle.

Public Properties

public bool IsActive { get; }

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

public IViewModel ViewModel { get; }

Gets the view model associated to this instance.

Protected Properties

protected bool EnsureNavigationContext { get; }

Gets a value indicating whether this UITabBarController<TViewModel> should ensure navigation context.

protected bool LoadedFromNib { get; set; }

Gets or sets a value indicating whether this UITabBarController<TViewModel> loaded from nib.

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 void RegisterViewIdentifier(string id, NSObject view)

Registers the specified identifier to the view.

Parameters

id Identifier.
view View.

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 ViewDidDisappear(bool animated)

Called when the view has disappeared from the screen.

Parameters

animated If set to true animated.

public void ViewDidLoad()

Called when the view is loaded to the view controller.

public void ViewWillAppear(bool animated)

Called when the view will appear to the screen.

Parameters

animated If set to true, animated.

public void ViewWillDisappear(bool animated)

Called when the view is about to disappear from the screen.

Parameters

animated If set to true animated.

Protected Methods

protected TViewModel CreateViewModel()

Called when the view model for this controller needs to be created.

Return Types

The view model.

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 initialized.

protected void InitializeViewControllers()

Called when the view controllers for the tab items 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.

protected void OnViewModelPropertyChanged(PropertyChangedEventArgs e)

Called when the properties of the associated ViewModel has changed.

Parameters

e The event argument.

Events

public event EventHandler<DismissViewEventArgs> ViewDismissed

Occurs when the view is dismissed.

  • No labels