The problem is that you are creating a new instance of the DirtyCheckingTextbox and assigning it to the tbxContent variable - which doesn't display it, or update the version which is already on the display.
Instead, move your code into a method, and call that:
public DirtyCheckingTextbox() : this(String.Empty)
{
}
public DirtyCheckingTextbox(string initialText)
{
Reset(initialText);
}
public void Reset(string initialText)
this.Text = initialText;
this.CleanText = this.Text;
}
{
var content = FileServices.GetContent(fileName);
tbxContent.Reset(content);
}
[edit]Types - very odd typos - OriginalGriff[/edit]