Carlos S
Carlos S

Reputation: 13

Xamarin Forms: Show an entrybox after tapping an image

I am trying to show an entrybox after tapping an image.

I have this:

enter image description here

And I want to achieve this after tapping on the keyboard image:

enter image description here

The gesture is not a problem I add this lines:

    keyboard.GestureRecognizer.Add(new TapGestureRecognizer((view,args) =>
    {
            ShowEntryBox();
    })):

The problem is that I do not know how I can show the entry box, I use XAML. I tried relativelayout and I saw samples of absolutelayout but I can not achieve it.

I am using Xamarin forms to android and ios App.

Upvotes: 0

Views: 558

Answers (1)

Pete
Pete

Reputation: 4746

Perhaps try a Grid?

In the center cell you can create two child controls:-

*) Label control.

*) Entry control.

and then give these controls each a name and set the appropriate .IsVisible value on each of these two controls accordingly, or alternatively hook the IsVisible for each of these controls into a ViewModel and set the state there instead.

Upvotes: 0

Related Questions