0

In this post I tried to find a way to re-template the contents of a FlowDocument. I've done several hours of research, and eventually come to this documentation on Control.Template property:

The ControlTemplate specifies the appearance of a Control; if a Control does not have a ControlTemplate, the Control will not appear in your application.

I call shenanigans.

The Paragraph, Run, Section, List, Table, and so forth all "appear in my application" but since they inherit from System.Windows.ContentElement instead of System.Windows.Controls.Control none of them have a Template property that I can use to redefine the visual tree of the control.

Is there any way to change the visual presentation of these elements?

Community
  • 1
  • 1
Scott Baker
  • 10,013
  • 17
  • 56
  • 102

1 Answers1

0

It is not possible to template the ContentElements, and its not intended.

But you can use

<BlockUIContainer/>

for templated Controls within a FlowDocument.

Manusch
  • 31
  • 3