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
{
/// <summary>
/// Represents a base notification item.
/// </summary>
public abstract class NotificationItem : ItemBase
{
/// <summary>
/// Initializes a new instance of the <see cref="NotificationItem"/> class.
/// </summary>
public NotificationItem() : base()
{
CanClose = true;
}
private bool _isExpanded;
/// <summary>
/// Gets or sets a value indicating whether the notification panel is expanded.
/// </summary>
public bool IsExpanded
{
get { return _isExpanded; }
set { _isExpanded = value; RaisePropertyChangedAuto(); }
}
private bool _canClose;
/// <summary>
/// Gets or sets a value indicating whether this instance can close.
/// </summary>
public bool CanClose
{
get { return _canClose; }
set { _canClose = value; RaisePropertyChangedAuto(); }
}
/// <summary>
/// Called when the item has been pressed.
/// </summary>
protected override void OnPreesed()
{
base.OnPreesed();
if (CanClose)
{
Close();
}
}
}
}