Commit 55875628 by Sebastián Katzer

Upgrade Microsoft.Toolkit.Uwp.Notifications to v2.0.0

parent b7eb94cb
...@@ -25,9 +25,8 @@ namespace Microsoft.Toolkit.Uwp.Notifications ...@@ -25,9 +25,8 @@ namespace Microsoft.Toolkit.Uwp.Notifications
public string ProtocolActivationTargetApplicationPfn { get; set; } public string ProtocolActivationTargetApplicationPfn { get; set; }
/// <summary> /// <summary>
/// Not supported on Windows: Specifies the behavior that the toast should use when the user invokes this action. Note that this option only works on <see cref="ToastButton"/> and <see cref="ToastContextMenuItem"/>. /// New in Fall Creators Update: Specifies the behavior that the toast should use when the user invokes this action. Note that this option only works on <see cref="ToastButton"/> and <see cref="ToastContextMenuItem"/>. Desktop-only, supported in builds 16251 or higher.
/// </summary> /// </summary>
[Obsolete("Windows does not support AfterActivationBehavior. If a future version of Windows supports this, we will undeprecate the property when support is added.")]
public ToastAfterActivationBehavior AfterActivationBehavior { get; set; } = ToastAfterActivationBehavior.Default; public ToastAfterActivationBehavior AfterActivationBehavior { get; set; } = ToastAfterActivationBehavior.Default;
internal void PopulateElement(IElement_ToastActivatable el) internal void PopulateElement(IElement_ToastActivatable el)
...@@ -39,9 +38,7 @@ namespace Microsoft.Toolkit.Uwp.Notifications ...@@ -39,9 +38,7 @@ namespace Microsoft.Toolkit.Uwp.Notifications
} }
el.ProtocolActivationTargetApplicationPfn = ProtocolActivationTargetApplicationPfn; el.ProtocolActivationTargetApplicationPfn = ProtocolActivationTargetApplicationPfn;
#pragma warning disable 618
el.AfterActivationBehavior = AfterActivationBehavior; el.AfterActivationBehavior = AfterActivationBehavior;
#pragma warning restore 618
} }
} }
} }
...@@ -102,9 +102,7 @@ namespace Microsoft.Toolkit.Uwp.Notifications ...@@ -102,9 +102,7 @@ namespace Microsoft.Toolkit.Uwp.Notifications
{ {
if (ActivationOptions != null) if (ActivationOptions != null)
{ {
#pragma warning disable 618
if (ActivationOptions.AfterActivationBehavior != ToastAfterActivationBehavior.Default) if (ActivationOptions.AfterActivationBehavior != ToastAfterActivationBehavior.Default)
#pragma warning restore 618
{ {
throw new InvalidOperationException("ToastContent does not support a custom AfterActivationBehavior. Please ensure ActivationOptions.AfterActivationBehavior is set to Default."); throw new InvalidOperationException("ToastContent does not support a custom AfterActivationBehavior. Please ensure ActivationOptions.AfterActivationBehavior is set to Default.");
} }
......
...@@ -101,9 +101,7 @@ namespace Microsoft.Toolkit.Uwp.Notifications ...@@ -101,9 +101,7 @@ namespace Microsoft.Toolkit.Uwp.Notifications
{ {
if (ActivationOptions != null) if (ActivationOptions != null)
{ {
#pragma warning disable 618
if (ActivationOptions.AfterActivationBehavior != ToastAfterActivationBehavior.Default) if (ActivationOptions.AfterActivationBehavior != ToastAfterActivationBehavior.Default)
#pragma warning restore 618
{ {
throw new InvalidOperationException("ToastHeader does not support a custom AfterActivationBehavior. Please ensure ActivationOptions.AfterActivationBehavior is set to Default."); throw new InvalidOperationException("ToastHeader does not support a custom AfterActivationBehavior. Please ensure ActivationOptions.AfterActivationBehavior is set to Default.");
} }
......
File mode changed from 100755 to 100644
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment