FocusManager.IsFocusScope

Jun 17, 2010 at 2:44 PM
Edited Jun 17, 2010 at 2:49 PM

Hi I am using the ExpressionDark theme with AvalonDock and I have a problem with FocusManager.IsFocusScope. It seems that I will get a stack overflow if i "tab" from a textbox unless I make a change to either my user control, or the ExpressionDark theme. (My UserControl)

To avoid a stack overflow, i need to add FocusManager.IsFocusScope="True":

<UserControl

...

FocusManager.IsFocusScope="True"

...

Or

(AvalonDock.Themes ExpressionDark) Remove FocusManager.IsFocusScope="True" from :

<!--DocumentPane-->

<Style x:Key="{x:Type ad:DocumentPane}" TargetType="{x:Type ad:DocumentPane}">

...

ContentPresenter FocusManager.IsFocusScope="True" <--- remove this line

Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedItem.Content}"

...

I noticed that the dev2010 theme doesn't have this issue, and also does not have the FocusManager.IsFocusScope in it's analogous ContentPresenter. Am I missing something obvious here, or is this a valid "fix" ?

Jun 17, 2010 at 9:33 PM

Absolutely is a valid fix that will be included in next release,

thanks for the feedback,

Ado