Exemple #1
0
        protected override ContentPresenter GetNotificationContent()
        {
            ContentPresenter contentControl = new ContentPresenter();

            contentControl.ContentTemplate = ContentTemplate;
            contentControl.OnApplyTemplate();
            contentControl.Content = Content;
            return(contentControl);
        }
Exemple #2
0
        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);
        }