Searched many places but didn't got the desired solution. XAML:
<FlowDocumentReader x:Name="fdr">
<FlowDocument x:Name="fd">
<Paragraph x:Name="ParaData" />
</FlowDocument>
</FlowDocumentReader>
In the code behind in C# Im asigning value to the paragraph on button click. See below code:
private void ShowName_Click(object sender, RoutedEventArgs e)
{
ParaData.Inlines.Add(new Run(txtEmpname.Text.ToString()));
}
PROBLEM IS: Everytime I click this button, the value is concatenated with the previous value in the paragraph, but I want the value to be replaced by the new value everytime on click.