views:

236

answers:

0

I'm generating a FlowDocument in code but I want it to apply dynamic styles defined in the resource dictionary. Even though I set the key using SetResourceReference, it seems like the resource lookup doesn't occur once I add the TextElements to the FlowDocument.

My guess is that just adding the control to the document doesn't hook up the notify, or even do a lookup on add. I'm wondering if there is some method I can call to trigger the resolution of composition on the document.