public StatusControlContext() { Toast = new ToastSource(); StatusLog = new ObservableCollection <string>(); UserMessageBoxResponseCommand = new Command <string>(UserMessageBoxResponse); UserStringEntryApprovedResponseCommand = new Command(UserStringEntryApprovedResponse); UserStringEntryCancelledResponseCommand = new Command(UserStringEntryCanceledResponse); }
public StatusControlContext() { ContextDispatcher = Application.Current?.Dispatcher ?? ThreadSwitcher.PinnedDispatcher ?? Dispatcher.CurrentDispatcher; Toast = new ToastSource(ContextDispatcher); StatusLog = new ObservableCollection <string>(); CancellationList = new ObservableCollection <UserCancellations>(); UserMessageBoxResponseCommand = new Command <string>(UserMessageBoxResponse); UserStringEntryApprovedResponseCommand = new Command(UserStringEntryApprovedResponse); UserStringEntryCancelledResponseCommand = new Command(UserStringEntryCanceledResponse); }