-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: adding DialogSample for Uno App
- Loading branch information
Showing
5 changed files
with
25 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows.Input; | ||
|
||
namespace ModuleA.ViewModels; | ||
|
||
internal class ViewAViewModel : ViewModelBase | ||
{ | ||
public ViewAViewModel(IRegionManager regionManager) | ||
private readonly IDialogService _dialogService; | ||
|
||
public ViewAViewModel(IRegionManager regionManager, IDialogService dialogService) | ||
: base(regionManager) | ||
{ | ||
_dialogService = dialogService; | ||
ShowAlertCommand = new DelegateCommand(ShowDialog); | ||
} | ||
|
||
public ICommand ShowAlertCommand { get; } | ||
|
||
private void ShowDialog() | ||
{ | ||
_dialogService.ShowDialog("AlertDialog", new DialogParameters | ||
{ | ||
{ "title", "Oh Snap" }, | ||
{ "message", "You can actually create much more amazing dialogs with Prism. Hello from ViewA!" } | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters