1 vote
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


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

Comments

most recent at top (show oldest at top)
ejadib wrote Jul 17 2007 at 3: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

Updating...
© 2006-2009 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2009.10.27.15987