Display type's name as DisplayName by default

This commit is contained in:
Antony Male 2014-05-17 12:32:50 +01:00
parent 5823437a28
commit 6c015ecd33
1 changed files with 6 additions and 3 deletions

View File

@ -16,8 +16,11 @@ namespace Stylet
/// </summary>
public class Screen : ValidatingModelBase, IScreen
{
public Screen() : base() { }
public Screen(IModelValidator validator) : base(validator) { }
public Screen() : this(null) { }
public Screen(IModelValidator validator) : base(validator)
{
this.DisplayName = this.GetType().FullName;
}
#region WeakEventManager
@ -54,7 +57,7 @@ namespace Stylet
#region IHaveDisplayName
private string _displayName;
public string DisplayName
public virtual string DisplayName
{
get { return this._displayName; }
set { SetAndNotify(ref this._displayName, value); }