-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ToastNotification and NotificationMirroring definitions
- Loading branch information
Showing
4 changed files
with
58 additions
and
8 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
namespace Windows.UI.Notifications | ||
{ | ||
public enum NotificationMirroring | ||
{ | ||
Allowed, | ||
Disabled, | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Uno.Logging; | ||
using Microsoft.Extensions.Logging; | ||
using Uno.Extensions; | ||
|
||
namespace Windows.UI.Notifications | ||
{ | ||
public partial class ToastNotification | ||
{ | ||
|
||
private string _Tag; | ||
public string Tag { | ||
get | ||
{ | ||
return this._Tag; | ||
} | ||
set | ||
{ | ||
this._Tag = value; | ||
if(this._Tag.Length > 64) | ||
{ | ||
// UWP limit: 16 chars, since Creators Update (15063) - 64 characters | ||
this.Log().Warn("Windows.UI.Notifications.ToastNotification.Tag is set to string longer than UWP limit"); | ||
} | ||
} | ||
} | ||
|
||
public Windows.Data.Xml.Dom.XmlDocument Content { get; internal set; } | ||
|
||
public ToastNotification(Windows.Data.Xml.Dom.XmlDocument content) | ||
{ | ||
Content = content; | ||
} | ||
|
||
} | ||
} |