Skip to end of metadata
Go to start of metadata

The presenter services provide various common ways to present an information to users. In this release, Crosslight for Windows Store 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 Store 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 Store 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 circle.

The message presenter in Windows Store 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.

The toast presenter in Crosslight for Windows Store is not the same Toast class in Windows Store SDK; its appearance honors most of the settings provided in the ToastSettings. You can customize the display position of the toast, the duration, and the image. When the toast is shown from the ViewModel, it will be displayed relative to the view by default. This means that the toast presenter will adjust itself when rotated.