Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

FlowDocumentReader ... ReaderScrollViewer

$
0
0

I have a FlowDocumentReader that displays one of those horrid dotted focus rectangles when it gets keyboard focused using tab.

Not the actual control, but something within the control.  I used the snoop tool and it was pointing to ReaderScrollViewer.  I found this thread from 2007 which explains a way of styling it, but I'm not able to get their solution working.  http://social.msdn.microsoft.com/Forums/en-ZA/wpf/thread/2b9b9532-dbfa-4a6a-b2f5-972a04ab39c3

I've tried setting the FocusVisualStyles on just about everything I could think of, but it is not affected...

<Style TargetType="{x:Type ScrollViewer}"><Setter Property="FocusVisualStyle" Value="{x:Null}"/></Style><Style TargetType="{x:Type FlowDocument}"><Setter Property="FocusVisualStyle" Value="{x:Null}"/></Style>

And I am unable to get to it when editing the template.

Can anyone please point me in the right direction?

Thanks a bunch.

~Christine

And here is my simple setup....

<FlowDocumentReader Margin="0,0,0,35" x:Name="flowDocReader" Zoom="50" IsPrintEnabled="True" ViewingMode="Scroll" SelectionBrush="Cyan" MinWidth="600" MaxHeight="600" Width="700" Height="400" IsTabStop="False" Focusable="False" Template="{DynamicResource FlowDocumentReaderControlTemplate1}" FocusVisualStyle="{x:Null}"><FlowDocument x:Name="flowDoc" Focusable="False"  FocusVisualStyle="{x:Null}"><BlockUIContainer x:Name="BlockCont" Focusable="False"  FocusVisualStyle="{x:Null}"><StackPanel x:Name="docPanel" Width="800" Height="1000" Margin="0"  FocusVisualStyle="{x:Null}">						<!--Removed for Troubleshooting--></StackPanel></BlockUIContainer></FlowDocument></FlowDocumentReader>



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>