public ToastNotificationServiceTest() { _wpfTextView = CreateTextView(); _editorFormatMap = CompositionContainer.GetExportedValue<IEditorFormatMapService>().GetEditorFormatMap(_wpfTextView); _toastNotificationServiceRaw = new ToastNotificationService(_wpfTextView, _editorFormatMap); _toastNotificationService = _toastNotificationServiceRaw; _toastControl = _toastNotificationServiceRaw.ToastControl; }
internal ToastNotificationService(IWpfTextView wpfTextView, IEditorFormatMap editorFormatMap) { _wpfTextView = wpfTextView; _editorFormatMap = editorFormatMap; _toastControl = new ToastControl(); _toastControl.Visibility = Visibility.Collapsed; _toastControl.ToastNotificationCollection.CollectionChanged += OnToastControlItemsChanged; _editorFormatMap.FormatMappingChanged += OnEditorFormatMappingChanged; _wpfTextView.Closed += OnTextViewClosed; UpdateTheme(); }