Кнопки Xamarin.Forms на изображении - PullRequest
0 голосов
/ 07 июля 2019

Нужна помощь, я новичок в Xamarin.

Помощь с 1 и 2

Как я могу поставить 1 и 2 кнопки поверх изображения? Мой XAML:

<carousel:CarouselViewControl Orientation="Horizontal" InterPageSpacing="0" Position="0" ItemsSource="{Binding Images}"
                                                              ShowIndicators="True"
                                                              Grid.Row="1" HeightRequest="250">
                                    <carousel:CarouselViewControl.ItemTemplate>
                                        <DataTemplate>
                                            <Image Source="{Binding ImSource}" Grid.Row="1" Aspect="AspectFill" />
                                        </DataTemplate>
                                    </carousel:CarouselViewControl.ItemTemplate>
                                </carousel:CarouselViewControl>

1 Ответ

0 голосов
/ 07 июля 2019

попробуйте это: вам также нужно установить поля для Im1 и Im2

    <Grid>
          <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
          </Grid.RowDefinitions>

          <Image
              Grid.Row="0"
              Grid.RowSpan="3"
              Source="{Binding ImSource}"
              Aspect="AspectFill"
               />
      <ImageButton
          Grid.Row="0"
          Source="{Binding Im1}"
          HorizontalOptions="End" />

      <ImageButton
          Grid.Row="2"
           Source="{Binding Im2}"
          HorizontalOptions="Start"/>
    </Grid>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...