Now in the host window if I type "foo" in the content manually in XAML then the complete user control is replaced by the text "foo".
<local:FileInputBox x:Name="fileInputBox1">Foo</local:FileInputBox>
And here is the screenshot:

This is OK because UserControl derives from ContentControl and hence the Content property is overriden in the code. To prevent this from happening we simply add an attribute to the class indication which property will serve as a ContentProperty as shown below:
[ContentProperty("FileName")]
public partial class FileInputBox : UserControl
This will work fine and the TextBox and the Button controls are displayed. But let's change the XAML code to include the Content property as shown below:
<local:FileInputBox x:Name="fileInputBox1" Content="Foo" ></local:FileInputBox>
This will again override the controls and show the text "Foo" for the UserControl.
A better question is that is there any difference between
<local:FileInputBox x:Name="fileInputBox1">Foo</local:FileInputBox>
and
<local:FileInputBox x:Name="fileInputBox1" Content="Foo" ></local:FileInputBox>
Actually both snippets of code above are identical but for some reason in order to override the Content behaviour of the UserControl we need to implement the OnContentChanged event of the UserControl.
protected override void OnContentChanged(object oldContent, object newContent)
{
if(oldContent != null)
{
throw new InvalidOperationException("Content Property cannot be set!");
}
}
Now, if we try to change the Content using XAML then the exception will be thrown.