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

Dynamic radio button creation

python user-interface layout wxpython

In wxPython, if I create a list of radio buttons and place the list initially, is it possible to change the contents in that list later?

Producing subplots and then combine them into a figure later in MATLAB

matlab plot

My program produces small figures during the command cycle. Is there a way to just save these figures and then combine them in one figure later?

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.