I have a FlowDocument in a standard WPF application window where I have text, and in this text some hyperlinks and buttons.
The problem is that if I put this FlowDocument inside except the 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 available for viewing. However, I do not need the full pageviewer function, since it displays navigation buttons (back / forward), and also has strange column behavior.
I want this in a simple FlowDocumentScrollViewer (or anything else that just displays text without additional fuzz).
EDIT: These are not just problems with hyperlinks. Any control such as Button, ListBox, ComboBox - everything the user can interact with is gray, regardless of the IsEnabled properties, if the FlowDocument is inside the FlowDocumentScrollViewer.
EDIT2: Well, that must have been a mistake or something on my part, because I finished rewriting the controls, and now it works. I suppose there was some kind if IsEnabled = False somewhere in the visual tree that caused this.
source share