protected override ContentPresenter GetNotificationContent() { ContentPresenter contentControl = new ContentPresenter(); contentControl.ContentTemplate = ContentTemplate; contentControl.OnApplyTemplate(); contentControl.Content = Content; return(contentControl); }
protected override ContentPresenter GetNotificationContent() { ContentPresenter contentControl = new ContentPresenter(); if (ContentTemplate == null) { if (Application.Current.Resources.Contains(DefaultContentTemplateResourceKey)) { ContentTemplate = Application.Current.Resources[DefaultContentTemplateResourceKey] as DataTemplate; } } contentControl.ContentTemplate = ContentTemplate; contentControl.OnApplyTemplate(); contentControl.Content = new { Title, Content }; return(contentControl); }