
Hi
I have a docksite on which is a toolwindowcontainer docked on the right side. When i click in the option menu on autohide and then click again on Dock, the application gives an exception " object reference not set to an nstance of an object". I enabled all exception trapping but that doesnt help.
This only fails when one of my DocumentWindow is shown. I have two subclasses from DocumentWindow of which only one triggers this behaviour:(Do you have an idea to solve this or at least to trap the exception in the debugger?
Thanks
Martin
[Modified at 03/31/2011 08:44 AM]
I have a docksite on which is a toolwindowcontainer docked on the right side. When i click in the option menu on autohide and then click again on Dock, the application gives an exception " object reference not set to an nstance of an object". I enabled all exception trapping but that doesnt help.
This only fails when one of my DocumentWindow is shown. I have two subclasses from DocumentWindow of which only one triggers this behaviour:(
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Actipro = ActiproSoftware.Windows.Controls;
using StatNeth.Blaise.IDE.Base;
using StatNeth.Blaise.IDE.Base.Converters;
using StatNeth.Blaise.IDE.ProjectManagement;
using StatNeth.Blaise.IDE.ProjectManagement.Controls;
using System.Windows;
namespace StatNeth.Blaise.IDE.Internal {
internal class DocumentWindow : Actipro.Docking.DocumentWindow, IDisposable {
private File _file;
public DocumentWindow(Actipro.Docking.DockSite docksite, File file, ViewTypeBase viewType)
: base(docksite) {
_file = file;
_documentGuid = file.Guid;
_viewType = viewType;
Update(file);
file.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(file_PropertyChanged);
}
private Guid _documentGuid;
private ViewTypeBase _viewType;
internal Guid DocumentGuid { get { return _documentGuid; } }
internal ViewTypeBase ViewType {
get { return _viewType; }
set { _viewType = value; }
}
internal File File { get { return _file; } }
private void file_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) {
File f = sender as File;
if (f != null) {
Update(f);
}
}
private void Update(File f) {
IsDirtyConverter conv = new IsDirtyConverter();
string s = (string) conv.Convert(f.IsDirty, typeof(string), null, null);
this.Title = f.Label + s;
this.FileName = f.Location.FullName;
}
public void Dispose() {
_file.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler(file_PropertyChanged);
}
}
}
Thanks
Martin
[Modified at 03/31/2011 08:44 AM]