MaterialDesignInXamlToolkit icon indicating copy to clipboard operation
MaterialDesignInXamlToolkit copied to clipboard

MaterialDesignEmbeddedDialogHost and focus on open

Open jespersh opened this issue 5 years ago • 0 comments

When using DialogHost in a Style="{StaticResource MaterialDesignEmbeddedDialogHost}" configuration, then when opening, the focus for the first focusable control doesn't seem quite right. It can be replicated using dialoghost Sample 2 "pass view".

If I use the embedded version, then nothing seems to have focus. If I add FocusManager.FocusedElement="{Binding RelativeSource={RelativeSource Self}}" to the first button in embedded a dialoghost: image However I can't just hit enter on that button and there's no dashed lines in the button like this either: image Which seems related to it setting logical focus, but not physical focus: https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/focus-overview#logical-focus

jespersh avatar May 12 '20 09:05 jespersh