/// <summary> /// Delegate called when the is open property changed. /// </summary> /// <param name="pObject">The modified object.</param> /// <param name="pEventArgs">The event arguments.</param> private static void OnIsOpenChanged(DependencyObject pObject, DependencyPropertyChangedEventArgs pEventArgs) { NotifierButton lControl = pObject as NotifierButton; if (lControl != null && (bool)pEventArgs.NewValue) { lControl.mNotificationCountRenderer.Blink = false; } }
/// <summary> /// Delegate called when the notification count property changed. /// </summary> /// <param name="pObject">The modified object.</param> /// <param name="pEventArgs">The event arguments.</param> private static void OnNotificationCountChanged(DependencyObject pObject, DependencyPropertyChangedEventArgs pEventArgs) { NotifierButton lControl = pObject as NotifierButton; if (lControl != null) { lControl.UpdateState((int)pEventArgs.OldValue, (int)pEventArgs.NewValue); } }
/// <summary> /// Initializes a new instance of the <see cref="NotifierViewModel"/> class. /// </summary> /// <param name="pParentControl">The parent control.</param> public NotifierViewModel(NotifierButton pParentControl) { this.mParentButton = pParentControl; this.mNotifToTimerMap = new Dictionary <ANotificationViewModel, Timer>(); this.Notifications = new ObservableCollection <ANotificationViewModel>(); this.DisplayedNotification = null; this.MessageViewWidth = 200; this.MessageViewHeight = 125; }