1 //----------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 //----------------------------------------------------------------
5 namespace System.Activities.Presentation.View
8 using System.Collections.Generic;
12 using System.Windows.Controls;
13 using System.Windows.Data;
14 using System.Windows.Documents;
15 using System.Windows.Input;
16 using System.Windows.Media;
17 using System.Windows.Media.Imaging;
18 using System.Windows.Navigation;
19 using System.Windows.Shapes;
21 // This class will be the error view presented when there are exceptions or errors
22 // in the designer view, or when we are unable to load the designer.
23 sealed partial class ErrorView : UserControl
26 public static readonly DependencyProperty MessageProperty =
27 DependencyProperty.Register("Message", typeof(string), typeof(ErrorView), new UIPropertyMetadata(string.Empty));
29 public static readonly DependencyProperty DetailsProperty =
30 DependencyProperty.Register("Details", typeof(string), typeof(ErrorView), new UIPropertyMetadata(string.Empty));
35 InitializeComponent();
36 this.DataContext = this;
41 get { return (string)GetValue(MessageProperty); }
42 set { SetValue(MessageProperty, value); }
47 get { return (string)GetValue(DetailsProperty); }
48 set { SetValue(DetailsProperty, value); }
51 public EditingContext Context { get; set; }
53 private void OnHelpExecuted(object sender, ExecutedRoutedEventArgs e)
55 if (this.Context == null)
59 IIntegratedHelpService help = this.Context.Services.GetService<IIntegratedHelpService>();
62 help.ShowHelpFromKeyword(HelpKeywords.ErrorView);
66 System.Diagnostics.Process.Start(SR.DefaultHelpUrl);