WPF - Bound Control Not Updating When Property Changed?

I've bound the Text property of a TextBox to a base object's property and it seems to work just fine. Unfortunately, when I programatically change the value of the property, it doesn't seem to update on the GUI.

Here's the property:

public string SealedDate
{
    get
    {
        string result = string.Empty;

        if (_DACase.SealedDate != DateTime.MinValue)
        {
            result = Formatting.FormatDate(_DACase.SealedDate);
        }

        return result;
    }
    set
    {
        DateTime theDate = DateTime.MinValue;

        if (DateTime.TryParse(value, out theDate)
            && _DACase.SealedDate != theDate)
        {
            _DACase.SealedDate = theDate;
            base.OnChanged(); //fires event so I know the value of the object has changed
        }
    }
}

And the value of that property is being set when another property it being set:

public bool IsSealed
{
    get
    {
        return _DACase.SealedId > 0
            || _DACase.SealedDate != DateTime.MinValue;
    }
    set
    {
        if (value != (_DACase.SealedId > 0 || _DACase.SealedDate != DateTime.MinValue))
        {
            if (value)
            {
                this.SealedId = Authentication.CurrentUser.Id;
                this.SealedDate = Formatting.FormatDate(DateTime.Now);
            }
            else
            {
                this.SealedId = 0;
                this.SealedDate = DateTime.MinValue.ToString();
            }
            base.OnChanged();
        }
    }
}

And the XAML of the TextBox that isn't updating when I think it should:

<TextBox Name="txtSealedDate" Text="{Binding SealedDate}" Grid.Column="5" Grid.Row="3" IsReadOnly="True" />

Answers


Vlad's solution (in the comments) was correct.


Need Your Help

What is the Unix command to create a hardlink to a directory in OS X?

osx bash filesystems unix ln

How do you create a hardlink (as opposed to a symlink or a Mac OS alias) in OS X that points to a directory? I already know the command "ln target destination" but that only works when the target i...

error: /home/retok/proj/src/com/hellow/app/HelloActivity.java:34: ';' expected

java android methods onclick onclicklistener

I'm trying to make Android onClick() method easier to read, so I wrap it like this

Draw an Item like home screen icon of iPhone

iphone ios

I want to draw an Item that similar as item of iPhone. I have also draw with UIView like this

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.