L
L
logosan2015-10-31 11:31:47
Xamarin
logosan, 2015-10-31 11:31:47

How to hang a command on Frame?

There is such a piece of markup in Xamarin Forms. I need to handle clicking on a Frame with a command, but I was puzzled not finding the Command property. It is possible to use a Button instead of a Frame, but the appearance is not quite the way I would like, the StackLayout disappears and padding appears.

<Frame BackgroundColor="#f39c12" Padding="5" Grid.Column="1" Grid.Row="1">
      <StackLayout VerticalOptions="Center">
        <Image Source="Image/Icon/Training.png" HorizontalOptions="Center" />
        <Label Text="Тренировка" Font="25" TextColor="#ecf0f1" HorizontalOptions="Center" />
      </StackLayout>
    </Frame>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
logosan, 2015-10-31
@logosan

Problem solved!!!

<Frame.GestureRecognizers>
    <TapGestureRecognizer Command="{Binding RouteFinePage}" />
</Frame.GestureRecognizers>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question