1

Closed

WPF C# View Is Not Being Disposed correctly

description

Hi,

Is the Disposed property that is generated in by the Guidence Package really correct
    /// <summary>
    /// Returns true if this object has had the Dispose method called.
    /// </summary>
    public bool Disposed
    {
        get { return _presenter != null && _WPFUIElementAdapter != null; }
    }
Shouldn't it be

public bool Disposed
    {
        get { return _presenter == null && _WPFUIElementAdapter == null; }
    }
Ie the View is disposed if the Presenter and WPFUIElementAdapter is null

file attachments

Closed Apr 28, 2008 at 6:47 PM by MichaelPuleio
Fixed in SCSF April 2008

comments

ejadib wrote Jul 17, 2007 at 2:33 PM

In order to fix this please modify the file View.xaml.GeneratedCode.cs.t4 located at %programfiles%\Microsoft Smart Client Factory\Guidance Package\Templates\Items\View.CS

For your convenience I attach the modified file