focusvisualstyle

WPF - FocusVisualStyle where do i apply it?

I have a UserControl which basically wraps a ListBox like this - <ListBox x:Name="lb" ItemsSource="{Binding ElementName=UC,Path=Pages}" Background="{Binding ElementName=UC,Path=Background}" BorderBrush="Transparent" ScrollViewer.CanContentScroll="False" ScrollViewer.Horizonta...

Remove focus rectangle on a UserControl

I have a WPF UserControl with Focusable="True". It's the only focusable control in the window. Whenever the user presses Tab or Alt (and especially when they Alt+Tab to another application), my UserControl acquires a dotted-line border, aka focus rectangle. The focus rectangle then stays there until the window is closed. How can I prev...

Why does ItemsControl show a focus rectangle when its parent is focused?

WPF's ItemsControl will display a focus rectangle when it thinks it has focus and the user presses Tab or Alt. But I recently had an ItemsControl display a focus rectangle even though it did not have focus -- one of its parents did. The ItemsControl was inside a UserControl, which was inside another UserControl that did have focus. Some...

Change the FocusVisualStyle in the entire application

While making a WPF application I would like to change the default FocusVisualStyle (the black "marching ants" border) to something else, like for example a blue border. I would like to make this change for every control on the entire application. Is there an easier way then changing the default style for every type of control? Thanks ...

Rich WPF FocusVisualStyle.

Does anyone have a rich FocusVisualStyle to share? I am looking for something like the Silverlight 4 one or Google TextBoxes in Chrome or like Visual Studio 2010. Examples: ...