0

I am clearing content from FlowDocument using Dispatcher.The code is in non UI assembly. The code is

     Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal, 
         new Action(delegate()
    {

    _flowDocument.Blocks.Clear();
    }

However I am facing null reference exception whenever this code executes.


Well I already have a thread (forgot about it while posting the question) to perform operations on FlowDocument, So I just need to call the above mentioned code using a delegate .

casperOne
  • 73,706
  • 19
  • 184
  • 253
Ram
  • 11,404
  • 15
  • 62
  • 93

0 Answers0