Yes, I also ran into this problem. The TextBox will not initially be configured correctly at startup, and you can workaround by linking the Text property to the startup text (say, the value of the Balkan space is "").
XAML:
<StackPanel Margin="5,0,5,0" VerticalAlignment="Center">
<DockPanel Margin="5" >
<Label Content="Prompt"/>
<TextBox MaxLines="3"
MinLines="3" x:Name="text"
VerticalScrollBarVisibility="Auto"
Text="{Binding StartUpText}"
AcceptsReturn="True"
TextWrapping="Wrap" TextChanged="text_TextChanged" Loaded="text_Loaded" />
</DockPanel>
</StackPanel>
WITH#:
public MainWindow()
{
InitializeComponent();
this.DataContext=this;
StartUpText = " ";
}
private string startUpText;
public string StartUpText
{
get { return startUpText; }
set
{
if (value != startUpText)
{
startUpText = value;
}
}
}
Divya source
share