I have a FlowDocument in a standard WPF application window where I have some text, and in this text some hyperlinks and buttons.
The problem is, if I put this FlowDocument inside anything except a FlowDocumentPageViewer the hyperlinks and buttons are disabled ("grayed out").
<FlowDocumentScrollViewer> <FlowDocument> <Paragraph> Hello, World! <Hyperlink NavigateUri="some-uri">click me</Hyperlink> <Button Click="myButton_Click" Content="Click me too!" /> </Paragraph> </FlowDocument> </FlowDocumentScrollViewer>
The above will work and the link will be clickable. However, I don’t want the full pageviewer thing since it will show navigation buttons (back/forward) zoom and it also has a weird column behavior.
I want it in a simple FlowDocumentScrollViewer (or anything else that just displays the text without additional fuzz).
EDIT: It’s not only hyperlinks that is the problem. Any control, like Button, ListBox, ComboBox – anything that the user can interact with – is "grayed out" regardless of the IsEnabled properties if the FlowDocument is inside a FlowDocumentScrollViewer.
EDIT2: Alright, it must have been a mistake or something from my end, because I ended up rewriting the control and now it works. I guess there was some sort if IsEnabled=False somewhere in the visual tree that caused this.
I’m using a FlowDocumentScrollViewer for my about box:
I don’t have any of the controls or issues you mention.