I have this line in my code
UserLoginLabel.DataBindings.Add(new Binding("Text", Foo, "bar.Username"));
Which display the username (and just the username) in the textbox correctly. How come this code
Binding b = new Binding("Text", Foo, "bar.Username")
{
FormatString = "Logged in as {0}.",
FormattingEnabled = true
};
UserLoginLabel.DataBindings.Add(b);
has the exact same effect? Is this not how to format a data binding?