Tab键顺序不适用于c#中的TextBlock

时间:2016-11-25 11:41:46

标签: c# xaml

Tab键顺序不适用于xaml中的TextBlock。我已将标签索引属性分配给TextBlock,但关注<Canvas x:Name="cvs_links" Height="19" Width="224" HorizontalAlignment="Left" KeyboardNavigation.IsTabStop="True" KeyboardNavigation.TabNavigation="Local"> <TextBlock x:Name="Link_selectnone" IsEnabled="{Binding Path=HasDevices}" Height="19" Width="98.734" TextWrapping="Wrap" FontSize="12" Foreground="#FF6987BF" MouseEnter="Link_selectall_MouseEnter" MouseLeave="Link_selectall_MouseLeave" MouseLeftButtonDown="Link_selectnone_MouseLeftButtonDown" Canvas.Left="0" Canvas.Top="0"> <Run Text="{x:Static local:Resources.DISCOVERYCTRL_SELECTNONE}" TextDecorations="Underline"/> <LineBreak/> <Run TextDecorations="Underline"/> <LineBreak/> <Run TextDecorations="Underline" KeyboardNavigation.IsTabStop="True" KeyboardNavigation.TabIndex="1" Focusable="True" IsEnabled="True"/> </TextBlock> </Canvas> 无法按下TAB按钮。

 <main>
    <root>
    <SubRoot>
    <type>R</type>
    <mand>N</mand>
    <Section>B</Section>
    </SubRoot>
    <SubRoot>
    <type>P</type>
    <mand>Y</mand>
    <Section>A</Section>
    </SubRoot>
    </root>
</main>

0 个答案:

没有答案