The presenter services provide various common ways to present an information to users. In this release, Crosslight for Windows Phone includes four type of presenters:
- Message Presenter – presents a text through message box interface
- Toast Presenter – presents a text through a toast-style interface that will hide by itself after certain interval
- Action Presenter – prompts a list of options for users to choose
- Activity Presenter – presents an indicator showing that the app is busy performing an activity
Similar to the other services, you don’t write code to access the presenter services in the Windows Phone application layer. Instead, you access the presenter service from the ViewModel to enable user interaction logic sharing for cross-platform apps development. For more information about programming with presenter services, see Using Presenters for Basic User Interactions.
The following illustration shows the visual details and expected results of each presenter implemented in the Crosslight for Windows Phone platform.
The action presenter offers more custom way to do actions. You can define the highlight index, as well as the cancel index which will be placed at the most bottom. The activity presenter shows an indefinite progress bar that runs from left to right corner of screen. The message presenter in Windows Phone using CustomMessageBox class which usage is simplified to the use of message presenter service in the view model. You can display simple text message as well multi-choice actions prompt, up until three buttons.