Interface IModelViewController
The base interface for a controller of any IModelView
Namespace: LemonEdge.Client.Core.Views.Core
Assembly: LemonEdge.ClientCore.dll
Syntax
public interface IModelViewController
Properties
Commands
A list of all the custom commands that should be displayed in the client application alongside the View
Declaration
IEnumerable<ViewCommand> Commands { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<ViewCommand> |
ContextHelpURL
An optional associated url of a help file for the view this controller works with
Declaration
string ContextHelpURL { get; }
Property Value
| Type | Description |
|---|---|
| string |
CurrentDisplayedItem
The current item being displayed against the View. This is the item last called with DisplayableItemDescriptor
Declaration
object CurrentDisplayedItem { get; }
Property Value
| Type | Description |
|---|---|
| object |
SelectedItemForSubViews
Returns the item this view holds that can be passed to sub views
This controller can change the item is passes to sub views (such as when this represents the selected item in a grid) by calling ModelLayoutDisplayerController.UpdateSubViews(IModelView)
Declaration
object SelectedItemForSubViews { get; }
Property Value
| Type | Description |
|---|---|
| object |
View
The view instance this controller is working with
Declaration
IModelView View { get; }
Property Value
| Type | Description |
|---|---|
| IModelView |
Methods
Clear()
Clears the associated View back to an initial blank state
Declaration
Task Clear()
Returns
| Type | Description |
|---|---|
| Task | A task indicating the completion of the operation |
CloseController()
Called when a view is being closed, and before the controller is disposed.
Used to dispose of associated commands and clear the view
Declaration
Task CloseController()
Returns
| Type | Description |
|---|---|
| Task | A task indicating the completion of the operation |
DisplayItem(object)
Displays the provided item in the associated View
Declaration
Task DisplayItem(object item)
Parameters
| Type | Name | Description |
|---|---|---|
| object | item | The item to be displayed against the view this controller is responsible for |
Returns
| Type | Description |
|---|---|
| Task | A task indicating the completion of the operation |
InitAsync()
Provides the controller a chance to initialize any dependant data. Called once by the system after controller creation.
Declaration
Task InitAsync()
Returns
| Type | Description |
|---|---|
| Task | A task indicating the completion of the operation |
Redisplay()
Indicates the current item should be redisplayed against the associated View
Declaration
Task Redisplay()
Returns
| Type | Description |
|---|---|
| Task | A task indicating the completion of the operation |