|
|
@ -30,14 +30,8 @@ namespace ICSharpCode.WpfDesign.AddIn |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public SharpDevelopElementHost(WpfViewContent viewContent, UIElement child) |
|
|
|
//needed for command routing (SharpDevelopElementHost -> DesignSurface)
|
|
|
|
: this() |
|
|
|
internal WpfViewContent ViewContent; |
|
|
|
{ |
|
|
|
|
|
|
|
this.viewContent = viewContent; |
|
|
|
|
|
|
|
this.Child = child; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WpfViewContent viewContent; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void CurrentDispatcher_UnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) |
|
|
|
static void CurrentDispatcher_UnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -49,8 +43,8 @@ namespace ICSharpCode.WpfDesign.AddIn |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (command.CanExecute(null, null)) |
|
|
|
if (command.CanExecute(null, null)) |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
else if (viewContent != null) |
|
|
|
else if (ViewContent != null) |
|
|
|
return command.CanExecute(null, viewContent.DesignSurface); |
|
|
|
return command.CanExecute(null, ViewContent.DesignSurface); |
|
|
|
else |
|
|
|
else |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
@ -59,8 +53,8 @@ namespace ICSharpCode.WpfDesign.AddIn |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (command.CanExecute(null, null)) { |
|
|
|
if (command.CanExecute(null, null)) { |
|
|
|
command.Execute(null, null); |
|
|
|
command.Execute(null, null); |
|
|
|
} else if (viewContent != null) { |
|
|
|
} else if (ViewContent != null) { |
|
|
|
command.Execute(null, viewContent.DesignSurface); |
|
|
|
command.Execute(null, ViewContent.DesignSurface); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|