using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Timers; using System.Windows.Media; using Tango.Core; namespace Tango.PPC.Common.Notifications { /// /// Represents a base notification item. /// public abstract class NotificationItem : ItemBase { /// /// Initializes a new instance of the class. /// public NotificationItem() : base() { CanClose = true; } private bool _isExpanded; /// /// Gets or sets a value indicating whether the notification panel is expanded. /// public bool IsExpanded { get { return _isExpanded; } set { _isExpanded = value; RaisePropertyChangedAuto(); } } private bool _canClose; /// /// Gets or sets a value indicating whether this instance can close. /// public bool CanClose { get { return _canClose; } set { _canClose = value; RaisePropertyChangedAuto(); } } /// /// Called when the item has been pressed. /// protected override void OnPreesed() { base.OnPreesed(); if (CanClose) { Close(); } } } }