Table of Contents

Class ListController<T>

Namespace
The.WPF.Screens
Assembly
Instagile.WPF.dll

Initializes a new instance of the ListController<T> class.

public class ListController<T> : ScreenControllerBase<ListModel<T>, ListView, ListOptions>, IScreenController<ListModel<T>>, IScreenController where T : IEntity<T>

Type Parameters

T
Inheritance
ListController<T>
Implements
Inherited Members

Constructors

ListController(IServices, IEntityQuery<T>, int?, Action<ListOptions>)

Initializes a new instance of the ListController<T> class.

public ListController(IServices services, IEntityQuery<T> query, int? count = null, Action<ListOptions> configure = null)

Parameters

services IServices

A framework instance.

query IEntityQuery<T>

The entity query that provides the data source for the list.

count int?

Optional pre-computed count of entities in the query. If not provided, the count will be retrieved asynchronously.

configure Action<ListOptions>

Optional action to configure list options.

ListController(IServices, IFrozenQuery<T>, Action<ListOptions>)

public ListController(IServices services, IFrozenQuery<T> query, Action<ListOptions> configure = null)

Parameters

services IServices
query IFrozenQuery<T>
configure Action<ListOptions>

Methods

CopyCell(ListRow<T>, string)

public void CopyCell(ListRow<T> row, string columnKey)

Parameters

row ListRow<T>
columnKey string

CopyRow(ListRow<T>)

public void CopyRow(ListRow<T> row)

Parameters

row ListRow<T>

CreateColumn(ListModel<T>, AttributeInfo)

protected virtual ListColumn CreateColumn(ListModel<T> vm, AttributeInfo a)

Parameters

vm ListModel<T>
a AttributeInfo

Returns

ListColumn

CreateColumn(ListModel<T>, RelationshipInfo)

protected virtual ListColumn CreateColumn(ListModel<T> vm, RelationshipInfo r)

Parameters

vm ListModel<T>
r RelationshipInfo

Returns

ListColumn

CreateDescriptionColumn(ListModel<T>)

protected virtual ListColumn CreateDescriptionColumn(ListModel<T> vm)

Parameters

vm ListModel<T>

Returns

ListColumn

CreateUninitialisedModel(ISurface)

protected override ListModel<T> CreateUninitialisedModel(ISurface s)

Parameters

s ISurface

Returns

ListModel<T>

CreateUninitialisedRowModel()

protected virtual ListRow<T> CreateUninitialisedRowModel()

Returns

ListRow<T>

EnsureLoadedAsync()

public Task EnsureLoadedAsync()

Returns

Task

GetAvailableColumns(ListModel<T>)

protected virtual IEnumerable<ListColumn> GetAvailableColumns(ListModel<T> vm)

Parameters

vm ListModel<T>

Returns

IEnumerable<ListColumn>

GetCurrentOrdering()

public (PropertyInfo metadata, bool ascending)[] GetCurrentOrdering()

Returns

(PropertyInfo metadata, bool ascending)[]

GetCustomRowCommands(T)

protected virtual IEnumerable<IScreenCommand> GetCustomRowCommands(T row)

Parameters

row T

Returns

IEnumerable<IScreenCommand>

GetOrderedQueryAsync(IEntityQuery<T>, IEnumerable<(PropertyInfo metadata, bool ascending)>)

Apply ordering to the query. Override this to provide custom sorting logic or in-memory transformation.

protected virtual Task<IEntityQuery<T>> GetOrderedQueryAsync(IEntityQuery<T> source, IEnumerable<(PropertyInfo metadata, bool ascending)> orderings)

Parameters

source IEntityQuery<T>
orderings IEnumerable<(PropertyInfo metadata, bool ascending)>

Returns

Task<IEntityQuery<T>>

GetPreloadedPropertyPaths(ListModel<T>)

protected virtual IEnumerable<PropertyPath> GetPreloadedPropertyPaths(ListModel<T> model)

Parameters

model ListModel<T>

Returns

IEnumerable<PropertyPath>

GetPreloadedRelationshipPaths(ListModel<T>)

protected virtual IEnumerable<RelationshipPath> GetPreloadedRelationshipPaths(ListModel<T> model)

Parameters

model ListModel<T>

Returns

IEnumerable<RelationshipPath>

GetPreloadedRelationships(ListModel<T>)

protected virtual IEnumerable<RelationshipInfo> GetPreloadedRelationships(ListModel<T> model)

Parameters

model ListModel<T>

Returns

IEnumerable<RelationshipInfo>

InitialiseModel(ListModel<T>)

protected override void InitialiseModel(ListModel<T> vm)

Parameters

vm ListModel<T>

OnClosed()

protected override sealed void OnClosed()

OnControllerClosed()

protected virtual void OnControllerClosed()

OnControllerOpened()

protected virtual void OnControllerOpened()

OnModalCancelled(IEntity)

protected virtual void OnModalCancelled(IEntity originalEntity)

Parameters

originalEntity IEntity

OnModalClosed(IEntity, IEntity)

protected virtual void OnModalClosed(IEntity originalEntity, IEntity editedEntity)

Parameters

originalEntity IEntity
editedEntity IEntity

OnModalOpened(IEntity)

protected virtual void OnModalOpened(IEntity originalEntity)

Parameters

originalEntity IEntity

OnModalOpening(IEntity)

protected virtual void OnModalOpening(IEntity originalEntity)

Parameters

originalEntity IEntity

OnOpened()

protected override sealed void OnOpened()

Open(T, bool)

create a Display or DisplayModal screen for an entity from the list

protected virtual Task Open(T e, bool foreground)

Parameters

e T
foreground bool

Returns

Task

OpenAsync(T)

public virtual Task OpenAsync(T e)

Parameters

e T

Returns

Task

OpenInNewTabAsync(T)

public Task OpenInNewTabAsync(T e)

Parameters

e T

Returns

Task

RefreshAsync(bool)

public Task RefreshAsync(bool force = false)

Parameters

force bool

Returns

Task

RefreshAsync(IEntityQuery<T>, int?, bool)

public Task RefreshAsync(IEntityQuery<T> newQuery, int? newCount = null, bool force = false)

Parameters

newQuery IEntityQuery<T>
newCount int?
force bool

Returns

Task

RefreshAsync(IEntitySet<T>, bool)

public Task RefreshAsync(IEntitySet<T> newSet, bool force = false)

Parameters

newSet IEntitySet<T>
force bool

Returns

Task

RefreshAsync(IFrozenQuery<T>, bool)

public Task RefreshAsync(IFrozenQuery<T> newQuery, bool force = false)

Parameters

newQuery IFrozenQuery<T>
force bool

Returns

Task

Events

ModalCancelled

public event Action<IEntity> ModalCancelled

Event Type

Action<IEntity>

ModalClosed

public event Action<IEntity, IEntity> ModalClosed

Event Type

Action<IEntity, IEntity>

ModalOpened

public event Action<IEntity> ModalOpened

Event Type

Action<IEntity>

ModalOpening

public event Action<IEntity> ModalOpening

Event Type

Action<IEntity>