Browse Source

Fix a bug where Outline was not displayed in the first switch to Design tab.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6409 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Kumar Devvrat 15 years ago
parent
commit
49202257d4
  1. 9
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs

9
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs

@ -35,6 +35,9 @@ namespace ICSharpCode.WpfDesign.AddIn @@ -35,6 +35,9 @@ namespace ICSharpCode.WpfDesign.AddIn
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;
@ -98,10 +101,6 @@ namespace ICSharpCode.WpfDesign.AddIn @@ -98,10 +101,6 @@ namespace ICSharpCode.WpfDesign.AddIn
outline.Root = OutlineNode.Create(designer.DesignContext.RootItem);
}
var outlineContent = GetService(typeof(IOutlineContentHost));
if(outlineContent==null)
this.Services.AddService(typeof(IOutlineContentHost),Outline);
propertyGridView.PropertyGrid.SelectedItems = null;
designer.DesignContext.Services.Selection.SelectionChanged += OnSelectionChanged;
designer.DesignContext.Services.GetService<UndoService>().UndoStackChanged += OnUndoStackChanged;
@ -131,7 +130,7 @@ namespace ICSharpCode.WpfDesign.AddIn @@ -131,7 +130,7 @@ namespace ICSharpCode.WpfDesign.AddIn
if(_stream.CanRead){
_stream.Position = 0;
using (var reader = new StreamReader(_stream))
using (var writer = new StreamWriter(stream)) {
using (var writer = new StreamWriter(stream)) {
writer.Write(reader.ReadToEnd());
}
}

Loading…
Cancel
Save