Use as follows,
using (Stream stream = assembly.GetManifestResourceStream(this.GetType(), NAME))
{
FlowDocument document = (FlowDocument)XamlReader.Load(stream);
flow.Document = document;
}
Here I just changed
assembly.GetManifestResourceStream(NAME)
to
assembly.GetManifestResourceStream(this.GetType(), NAME)