Skip to end of metadata
Go to start of metadata

Represents an advanced form view controller that leverages the powerful Crosslight Form Builder definitions.

Definition

public class UIFormViewController<TViewModel> : UITableViewController<TViewModel>,

IFormViewController, IPopoverNotification, IMasterDetailViewNotification

where TViewModel : IDetailViewModel, class

Type Parameters

TViewModel

Summary

The following table summarizes the members exposed in this class.

Public Constructors

Public Properties

ActivePicker Gets or sets the active picker.
ActiveProperty Gets or sets the active property.
AllowSearching Gets a value indicating whether this UIFormViewController<TViewModel> allow searching.
CancelButtonItem Gets or sets a value indicating whether this instance cancel button item.
CancelButtonVisibility Gets or sets a value indicating whether this instance cancel button visibility.
CurrentItem Gets the current item bound to the form view.
DoneButtonItem Gets or sets the done button item.
DoneButtonVisibility Gets or sets the done button visibility.
Form Gets the form definition associated to this instance.
FormState Gets the state of the form.
HideKeyboardOnScroll Gets a value indicating whether the keyboard should be automatically hidden on scroll.
IsDetailChanged Gets or sets a value indicating whether the detail item has changed.
NoItemMessage Gets the message to display when the UIFormViewController<TViewModel> property is empty.
TableViewStyle Gets the table view style.

Public Methods

AddComponentDelegate(IComponentViewDelegate) Adds the component delegate to this instance.
AutoShowDoneButton(bool) Automatically show done button.
DidRotate(UIInterfaceOrientation) Called when the view has rotated.
EvaluateValueBinding<T>(BindingAttribute) Evaluates the value binding.
EvaluateValueBinding(BindingAttribute, Type) Evaluates the value binding.
FindComponentDelegate<T>() Finds the component delegate.
GetString(string, string) Returns the string of the specified resource key, or fallback to the initial value.
InvalidateSize(bool) Invalidates the size of the view.
PopoverDismissed() Called when the popover has dismissed.
ViewWillAppear(bool) Called when the view is about to appear to the screen.
ViewWillDisappear(bool) Called when the view is about to disappear from the screen.
WillHideMasterViewController(UIBarButtonItem, UIPopoverController) Called when the view controller is about to become hidden.
WillRotate(UIInterfaceOrientation, double) Called when the view is about to rotate.
WillShowMasterViewController(UIBarButtonItem) Called when the view controller is about to become visible.

Protected Methods

Dispose(bool) Dispose this instance.
GetBindableProperty(string) Gets the bindable property.
GetResourceString(string) Gets the resource string.
InitializeView() Called when the view is in initialization cycle.
OnDetailPropertyChanged(PropertyChangedEventArgs) Called when the property values of detail item has changed.
OnViewCreated() Called when the view is created.
OnViewInitialized() Called when the view has been completely initialized.
OnViewModelPropertyChanged(PropertyChangedEventArgs) Called when the properties of the associated ViewModel has changed.
SaveChangesOnViewDisappear() Perform save changes when the view is about to disappear.
ViewWillDisappearAfterTransition(bool) Called when the view is about to disappear after transitioning.

Public Constructors

public UIFormViewController()

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

public UIFormViewController(TViewModel viewModel)

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

Parameters

viewModel View model.

Public Properties

public IPicker ActivePicker { get; set; }

Gets or sets the active picker.

public PropertyDefinition ActiveProperty { get; set; }

Gets or sets the active property.

public bool AllowSearching { get; }

Gets a value indicating whether this UIFormViewController<TViewModel> allow searching.

public UIBarButtonItem CancelButtonItem { get; set; }

Gets or sets a value indicating whether this instance cancel button item.

public CancelButtonVisibility CancelButtonVisibility { get; set; }

Gets or sets a value indicating whether this instance cancel button visibility.

public object CurrentItem { get; set; }

Gets the current item bound to the form view.

public UIBarButtonItem DoneButtonItem { get; set; }

Gets or sets the done button item.

public DoneButtonVisibility DoneButtonVisibility { get; set; }

Gets or sets the done button visibility.

public FormDefinition Form { get; }

Gets the form definition associated to this instance.

public FormState FormState { get; }

Gets the state of the form.

public bool HideKeyboardOnScroll { get; }

Gets a value indicating whether the keyboard should be automatically hidden on scroll.

public bool IsDetailChanged { get; set; }

Gets or sets a value indicating whether the detail item has changed.

public string NoItemMessage { get; }

Gets the message to display when the UIFormViewController<TViewModel> property is empty.

public UITableViewStyle TableViewStyle { get; }

Gets the table view style.

Public Methods

public void AddComponentDelegate(IComponentViewDelegate componentDelegate)

Adds the component delegate to this instance.

Parameters

componentDelegate Component delegate.

public void AutoShowDoneButton(bool isVisible)

Automatically show done button.

Parameters

isVisible If set to true is visible.

public void DidRotate(UIInterfaceOrientation fromInterfaceOrientation)

Called when the view has rotated.

Parameters

fromInterfaceOrientation From interface orientation.

public T EvaluateValueBinding<T>(BindingAttribute bindingAttribute)

Evaluates the value binding.

Type Parameters

T The 1st type parameter.

Parameters

bindingAttribute Binding attribute.

Return Types

The value binding.

public object EvaluateValueBinding(BindingAttribute bindingAttribute, Type type)

Evaluates the value binding.

Parameters

bindingAttribute Binding attribute.
type Type.

Return Types

The value binding.

public T FindComponentDelegate<T>()

Finds the component delegate.

Type Parameters

T The 1st type parameter.

Return Types

The component delegate.

public string GetString(string value, string resourceKey)

Returns the string of the specified resource key, or fallback to the initial value.

Parameters

value Value.
resourceKey Resource key.

Return Types

The string.

public void InvalidateSize(bool isInitializing)

Invalidates the size of the view.

Parameters

isInitializing If set to true is initializing.

public void PopoverDismissed()

Called when the popover has dismissed.

public void ViewWillAppear(bool animated)

Called when the view is about to 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.

public void WillHideMasterViewController(UIBarButtonItem barButtonItem, UIPopoverController popoverController)

Called when the view controller is about to become hidden.

Parameters

barButtonItem Bar button item.
popoverController Popover controller.

public void WillRotate(UIInterfaceOrientation toInterfaceOrientation, double duration)

Called when the view is about to rotate.

Parameters

toInterfaceOrientation To interface orientation.
duration Duration.

public void WillShowMasterViewController(UIBarButtonItem barButtonItem)

Called when the view controller is about to become visible.

Parameters

barButtonItem Bar button item.

Protected Methods

protected void Dispose(bool disposing)

Dispose this instance.

Parameters

disposing If set to true disposing.

protected BindableProperty GetBindableProperty(string property)

Gets the bindable property.

Parameters

property Property.

Return Types

The bindable property.

protected string GetResourceString(string key)

Gets the resource string.

Parameters

key Key.

Return Types

The resource string.

protected void InitializeView()

Called when the view is in initialization cycle.

protected void OnDetailPropertyChanged(PropertyChangedEventArgs e)

Called when the property values of detail item has changed.

Parameters

e E.

protected void OnViewCreated()

Called when the view is created.

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.

protected void SaveChangesOnViewDisappear()

Perform save changes when the view is about to disappear.

protected void ViewWillDisappearAfterTransition(bool animated)

Called when the view is about to disappear after transitioning.

Parameters

animated If set to true animated.
  • No labels