diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs index 10a6a3379c..220bc54535 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs @@ -26,14 +26,11 @@ namespace ICSharpCode.WpfDesign.AddIn /// /// IViewContent implementation that hosts the WPF designer. /// - public class WpfViewContent : AbstractViewContentHandlingLoadErrors, IHasPropertyContainer, IToolsHost + public class WpfViewContent : AbstractViewContentHandlingLoadErrors, IHasPropertyContainer, IToolsHost, IOutlineContentHost { public WpfViewContent(OpenedFile file) : base(file) { BasicMetadata.Register(); - var outlineContent = GetService(typeof(IOutlineContentHost)); - if(outlineContent==null) - this.Services.AddService(typeof(IOutlineContentHost),Outline); this.TabPageText = "${res:FormsDesigner.DesignTabPages.DesignTabPage}"; this.IsActiveViewContentChanged += OnIsActiveViewContentChanged; @@ -230,5 +227,9 @@ namespace ICSharpCode.WpfDesign.AddIn return outline; } } + + public object OutlineContent { + get { return this.Outline; } + } } } diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/OutlineView/Outline.xaml.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/OutlineView/Outline.xaml.cs index 1609193453..25043cbff7 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/OutlineView/Outline.xaml.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/OutlineView/Outline.xaml.cs @@ -14,12 +14,10 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -using ICSharpCode.SharpDevelop; -using ICSharpCode.SharpDevelop.Gui; namespace ICSharpCode.WpfDesign.Designer.OutlineView { - public partial class Outline : IOutlineContentHost + public partial class Outline { public Outline() { diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj index 7e79406020..abdd974cba 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj @@ -232,10 +232,6 @@ - - {2748AD25-9C63-4E12-877B-4DCE96FBED54} - ICSharpCode.SharpDevelop - {8035765F-D51F-4A0C-A746-2FD100E19419} ICSharpCode.SharpDevelop.Widgets diff --git a/src/AddIns/Misc/AddInManager/Project/AddInManager.csproj b/src/AddIns/Misc/AddInManager/Project/AddInManager.csproj index ebc481d257..6031de8326 100644 --- a/src/AddIns/Misc/AddInManager/Project/AddInManager.csproj +++ b/src/AddIns/Misc/AddInManager/Project/AddInManager.csproj @@ -17,7 +17,8 @@ 4 false v4.0 - Client + + ..\..\..\..\..\AddIns\Misc\AddInManager\ diff --git a/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/ICSharpCode.Reports.Core.csproj b/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/ICSharpCode.Reports.Core.csproj index 957a28d28a..ca9d338db9 100644 --- a/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/ICSharpCode.Reports.Core.csproj +++ b/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/ICSharpCode.Reports.Core.csproj @@ -35,7 +35,8 @@ false false true - Client + + False diff --git a/src/Libraries/TreeViewAdv/Aga.Controls/Aga.Controls.csproj b/src/Libraries/TreeViewAdv/Aga.Controls/Aga.Controls.csproj index 708d96ad40..ac8c2a8228 100644 --- a/src/Libraries/TreeViewAdv/Aga.Controls/Aga.Controls.csproj +++ b/src/Libraries/TreeViewAdv/Aga.Controls/Aga.Controls.csproj @@ -21,7 +21,8 @@ true key.snk v4.0 - Client + + diff --git a/src/Libraries/TreeViewAdv/Aga.Controls/Aga.Controls.csproj.user b/src/Libraries/TreeViewAdv/Aga.Controls/Aga.Controls.csproj.user index df9dd69bfd..5b923b0708 100644 --- a/src/Libraries/TreeViewAdv/Aga.Controls/Aga.Controls.csproj.user +++ b/src/Libraries/TreeViewAdv/Aga.Controls/Aga.Controls.csproj.user @@ -1,4 +1,5 @@ - + + diff --git a/src/Main/Base/Project/Src/Gui/AbstractViewContent.cs b/src/Main/Base/Project/Src/Gui/AbstractViewContent.cs index 81db9d8614..e8f8968916 100644 --- a/src/Main/Base/Project/Src/Gui/AbstractViewContent.cs +++ b/src/Main/Base/Project/Src/Gui/AbstractViewContent.cs @@ -510,14 +510,20 @@ namespace ICSharpCode.SharpDevelop.Gui #endregion #region IServiceProvider - ServiceContainer _services=new ServiceContainer(); + ServiceContainer services = new ServiceContainer(); - public object GetService(Type serviceType){ - return _services.GetService(serviceType); + public object GetService(Type serviceType) + { + object obj = services.GetService(serviceType); + if (obj == null) { + if (serviceType.IsInstanceOfType(this)) + return this; + } + return obj; } public ServiceContainer Services { - get { return _services; } + get { return services; } } #endregion diff --git a/src/Main/ICSharpCode.SharpDevelop.Widgets/Project/ICSharpCode.SharpDevelop.Widgets.csproj b/src/Main/ICSharpCode.SharpDevelop.Widgets/Project/ICSharpCode.SharpDevelop.Widgets.csproj index 9875e3fb46..70f8c2d0af 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Widgets/Project/ICSharpCode.SharpDevelop.Widgets.csproj +++ b/src/Main/ICSharpCode.SharpDevelop.Widgets/Project/ICSharpCode.SharpDevelop.Widgets.csproj @@ -17,8 +17,7 @@ False File v4.0 - - + Client False