Services
In order to use the built-in desktop services, call the RegisterDesktopServices() extension method of IServiceCollection:
services.RegisterDesktopServices();
The IListViewModelFactory service makes it possible to populate a list of drop-down items from a collection, enumeration or class constants. It contains the following methods:
GetItems()— returns a list ofListItemViewModelobjects by retrieving the keys and names from the collection. An optional empty item, withnullkey and the specified name, can be also added.GetEnumItems()— returns a list ofListItemViewModelobjects representing the values and display names of the values of an enumeration type. It is similar to theGetEnumSelectList()method of theIHtmlHelperservice available in web applications. An optional empty item can also be added.GetConstItems()— returns a list ofListItemViewModelobjects representing the values of all constants defined in a class. It is similar to theGetConstSelectList()extension method of theIHtmlHelperservice (see MVC for more information). An optional empty item can also be added.