Some fixes in ToastNotificationSample

This commit is contained in:
Martin Vega 2017-10-09 09:25:54 +02:00
Родитель 90d46298dd
Коммит 6bda978431
3 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -7,6 +7,7 @@ The final generated code is the result of a project configuration (project type
- [Application activation](activation.md)
- [Navigation between pages](navigation.md)
- [Notifications in Windows Template Studio](notifications.md)
## Understanding concepts for Windows Template Studio
@ -69,7 +70,6 @@ Windows Template Studio approaches UWP app creation using the following four att
| Uri Scheme | Add the ability to launch and deep link into the app with a custom URI scheme.|
## Table of Contents
* [Notifications in Windows Template Studio](notifications.md)
* [Installing / Using the extension](getting-started-extension.md)
* [**Using and extending your file->new**](getting-started-endusers.md)
* [Concepts of Windows Template Studio](readme.md)

Просмотреть файл

@ -50,8 +50,8 @@
<genTemplate:Metadata>
<genTemplate:Item Name="generator" Value="Windows Template Studio"/>
<genTemplate:Item Name="wizardVersion" Version="0.0.0.0" />
<genTemplate:Item Name="templatesVersion" Version="0.0.0.0" />
<genTemplate:Item Name="wizardVersion" Version="0.14.17282.65001" />
<genTemplate:Item Name="templatesVersion" Version="0.14.17282.1" />
<genTemplate:Item Name="projectType" Value="Blank" />
<genTemplate:Item Name="framework" Value="MVVMBasic" />
</genTemplate:Metadata>

Просмотреть файл

@ -11,8 +11,8 @@ namespace ToastNotificationSample.ViewModels
public string ActivationSource
{
get => _activationSource;
set => Set(ref _activationSource, value);
get { return _activationSource; }
set { Set(ref _activationSource, value); }
}
public ActivatedFromToastViewModel()
@ -21,12 +21,15 @@ namespace ToastNotificationSample.ViewModels
public void Initialize(ToastNotificationActivatedEventArgs args)
{
// args.Argument contains information specified on Toast notification creation in file ToastNotificationsService.Samples.cs
if (args.Argument == "ToastButtonActivationArguments")
{
// The application was launched by clicking on OK button of Toast Notification
ActivationSource = "ActivationSourceButtonOk".GetLocalized();
}
else if(args.Argument == "ToastContentActivationParams")
{
// The application was launched by clicking on the main body of Toast Notification
ActivationSource = "ActivationSourceContent".GetLocalized();
}
}