NotificationRequest 类
- 程序集
- ClassIsland.Shared.dll
提醒请求。
public class NotificationRequest : ObservableRecipient, INotifyPropertyChanged, INotifyPropertyChanging
- 继承
-
NotificationRequest
- 实现
- 继承成员
构造函数
NotificationRequest()
初始化一个 NotificationRequest 实例。
public NotificationRequest()
属性
CancellationToken
代表提醒被取消的取消令牌。
public CancellationToken CancellationToken { get; }
属性值
CompletedToken
代表提醒显示完成的取消令牌。
public CancellationToken CompletedToken { get; }
属性值
IsSpeechEnabled
此次通知是否启用朗读。
public bool IsSpeechEnabled { get; set; }
属性值
MaskContent
提醒时进入横幅要显示的内容
public object MaskContent { get; set; }
属性值
MaskDuration
提醒进入横幅时长。当TargetMaskEndTime不为null时,此项不起作用。
public TimeSpan MaskDuration { get; set; }
属性值
MaskSpeechContent
提醒进入横幅的朗读内容。当显示进入横幅时,如果启用了朗读,这里的字符串将被大声读出。
public string MaskSpeechContent { get; set; }
属性值
OverlayContent
提醒时要显示的内容
public object? OverlayContent { get; set; }
属性值
OverlayDuration
提醒内容显示时长。当TargetOverlayEndTime不为null时,此项不起作用。
public TimeSpan OverlayDuration { get; set; }
属性值
OverlaySpeechContent
提醒内容的朗读内容。当显示提醒内容时,如果启用了朗读,这里的字符串将被大声读出。
public string OverlaySpeechContent { get; set; }
属性值
RequestNotificationSettings
针对此次提醒的特殊设置。如果要使此设置生效,还要将IsSettingsEnabled设置为true。
public NotificationSettings RequestNotificationSettings { get; set; }
属性值
TargetMaskEndTime
目标进入横幅结束时间。如果此项不为null,那么在显示此提醒时,自动将MaskDuration设置为距离此值的时长。
public DateTime? TargetMaskEndTime { get; set; }
属性值
TargetOverlayEndTime
目标提醒结束时间。如果此项不为null,那么在显示此提醒时,自动将OverlayDuration设置为距离此值的时长。
public DateTime? TargetOverlayEndTime { get; set; }
属性值
方法
Cancel()
取消当前提醒。
public void Cancel()
事件
Canceled
当当前提醒被取消时触发。
public event EventHandler? Canceled
事件类型
Completed
当当前提醒显示完成时触发。
public event EventHandler? Completed