Problema: La navegación con la tecla TAB se detiene al colapsarse TextBlock/Hyperlink.WPF: Navegación con pestañas rota con hipervínculo colapsado
Reproducción:
<Window x:Class="TabTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Width="200" Height="200">
<Grid>
<StackPanel Orientation="Vertical">
<TextBox Text="before" />
<TextBlock>
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</TextBlock.Style>
<Hyperlink Focusable="False">
<TextBlock Text="test" />
</Hyperlink>
</TextBlock>
<TextBox Text="after" />
</StackPanel>
</Grid>
</Window>
Si ejecuta esta demo y pulse TAB súper simple, el cursor se desplaza al "antes" cuadro de texto. Presionar TAB nuevamente no ... nada. El cursor permanece en el cuadro de texto "anterior" y nunca llega al cuadro de texto "después". La navegación funciona como se espera cuando el TextBlock del hipervínculo está visible.
Pregunta: ¿Cómo hago que la navegación TAB funcione correctamente con el HyperLink colapsado?
simple pero eficaz ;-) Gracias! –