So, I just started using WPF. I'm trying to create a program to speed up the process of making cards. I'm currently struggling trying to append the text of two text blocks into a richtextblock (In order to create the description of a card with its effect and flavor text). WPF says the second textblock is "undefined". Here is my code.
private void EffectInput_TextChanged(object sender, TextChangedEventArgs e)
{
Paragraph effectText = new Paragraph();
Paragraph flavorText = new Paragraph();
effectText.Inlines.Add(EffectInput.Text);
flavorText.Inlines.Add(FlavorInput.Text); //This is the line throwing the error
Description.Document.Blocks.Clear();
Description.Document.Blocks.Add(effectText);
Description.Document.Blocks.Add(flavorText);
}
I'm new in this, what should I do?