Focus on a TextInput in code

Trying to get a TextInput to gain focus when clicking a button. I have tried setting:

< ZTextInput Focus.IsFocusable=“true” PlaceholderText=“Comment” ux:Name=“TextInput1” DockPanel.Dock=“Top”/>

And calling focus from code like this:


But it is not working. How do you set focus to a TextInput?

This seems to work in the Fuse Simulator:

<Panel Margin="20,20,20,20">
    <TextInput Alignment="VerticalCenter" ux:Name="txt1" />
    <Button Height="60" Text="Create Memory" Alignment="Bottom" ux:Name="btn1">
            <GiveFocus Target="txt1" />

Yes, ideally this is the kind of thing you’ll want to be doing in UX markup. Did Bjeld’s solution work for you, Sean?

With the lastest Fuse version, as of today, I cannot focus on a TextInput. Meaning, in the simulator, I have to press TAB so I can start typing in the input. On the phone preview app, I cannot type in the input field at all no matter what.

Any idea what can cause this?

@patrice: This seems to be unrealted to the issue discussed here. Could you perhaps open a new thread, so other users with similar issues will have an easier time finding the discussion?