I have a textblock which has a binding path with a converter, but I am unable to operate that with tab button. Textblock has an Onclick property which opens another page. I want to open that screen with keyboard. Kindly help!
I tried Keyboard Focusable in and also Focusable=On but its not working
You could (should!) use a Button
and make it look like a TextBlock
:
<Button Click="Button_Click">
<Button.Template>
<ControlTemplate TargetType="Button">
<TextBlock Text="Focus me!" />
</ControlTemplate>
</Button.Template>
</Button>
The above element can be both keyboard focused and clicked and still looks like a TextBlock
.
Remember that WPF controls are lookless which means that a control's behavior is independent from its appearance.