Forum Xamarin.Forms

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Button visible in all of layout

Hi, I have this following code in xaml:

  <!--Imagen de la mascota-->
  <StackLayout Orientation="Vertical" 
                                 AbsoluteLayout.LayoutBounds="0.5,0.05,370,370" AbsoluteLayout.LayoutFlags="PositionProportional">
    <control:CarouselView   ItemsSource="{Binding Adv.Images}"
                                                        AbsoluteLayout.LayoutBounds="0.5,0.06,360,360" AbsoluteLayout.LayoutFlags="PositionProportional">
      <control:CarouselView.ItemTemplate>
        <DataTemplate>
          <Image    Source="{Binding Image}"
                                        AbsoluteLayout.LayoutBounds="0.5,0.06,360,360" AbsoluteLayout.LayoutFlags="PositionProportional"/>
        </DataTemplate>
      </control:CarouselView.ItemTemplate>
    </control:CarouselView>
  </StackLayout>

  <!--Imagen de las visitas-->
  <Image  Source="icon.png"
          AbsoluteLayout.LayoutBounds="0.07,0.06,25,25" AbsoluteLayout.LayoutFlags="PositionProportional"/>
  <Label  Text="{Binding Adv.Views}"
          AbsoluteLayout.LayoutBounds="0.15,0.06" AbsoluteLayout.LayoutFlags="PositionProportional"/>

  <!--Nombre del propietario del anuncio-->
  <Label    Text="{Binding Owner}"
                        AbsoluteLayout.LayoutBounds="0.08,350" AbsoluteLayout.LayoutFlags="XProportional"/>

  <!--Boton con icono favorito-->
  <Button   Command="{Binding FavoriteCommand}"
          Image="{Binding FavoriteImage, Mode=TwoWay}"
                        IsVisible="{Binding IsVisibleFav}"
                        BackgroundColor="Transparent"
                        BorderColor="Transparent"
          AbsoluteLayout.LayoutBounds="0.9,335,50,50" AbsoluteLayout.LayoutFlags="XProportional"/>

  <!--Botón CHAT  -->
  <StackLayout  Orientation="Horizontal" Padding="5" Spacing="10"
                VerticalOptions="EndAndExpand"
                                    AbsoluteLayout.LayoutBounds="0.5,390" AbsoluteLayout.LayoutFlags="XProportional">
    <Button Command="{Binding ChatCommand}"
                                            IsVisible="{Binding IsVisibleChat}"
                                            Text="{languages:TranslateExtension txt_chat}"
                                            HorizontalOptions="Center"
                    VerticalOptions="EndAndExpand"/>

    <Button Command="{Binding AdoptedCommand}"
                                            IsVisible="{Binding IsVisibleAdopted}"
                    Text="{languages:TranslateExtension txt_adoptado}"
                    HorizontalOptions="Center"/>

    <Button Command="{Binding EditCommand}"
                                            IsVisible="{Binding IsVisibleEdit}"
                                            Text="{languages:TranslateExtension txt_editar}"
                                            HorizontalOptions="Center" />
  </StackLayout>

  <!--BoxView con todo el contenido de los datos del anuncio-->
  <BoxView  Color="Gray"
                            AbsoluteLayout.LayoutBounds="0.5,450,370,330" AbsoluteLayout.LayoutFlags="XProportional"    />
  <BoxView  Color="White"
            AbsoluteLayout.LayoutBounds="0.5,452,365,325" AbsoluteLayout.LayoutFlags="XProportional"    />

  <!--Nombre de la mascota-->
  <Label  Text="{Binding Adv.Nickname}"
          FontSize="30"
          TextColor="Black"
          AbsoluteLayout.LayoutBounds="0.5,460" AbsoluteLayout.LayoutFlags="XProportional"/>

  <!--Datos anuncio-->
  <!--Categoria-->
  <Label  Text="{Binding Category}"
          FontSize="15"
          TextColor="Black"
          AbsoluteLayout.LayoutBounds="0.5,510" AbsoluteLayout.LayoutFlags="XProportional"/>
  <!--Raza-->
  <Label  Text="{Binding Adv.Race}"
          FontSize="15"
          TextColor="Black"
          AbsoluteLayout.LayoutBounds="0.5,550" AbsoluteLayout.LayoutFlags="XProportional"/>
  <!--Edad-->
  <Label  Text="{Binding Adv.Age}"
          FontSize="15"
          TextColor="Black"
          AbsoluteLayout.LayoutBounds="0.5,590" AbsoluteLayout.LayoutFlags="XProportional"/>
  <!--Sexo-->
  <Label  Text="{Binding Adv.Sex}"
                        FontSize="15"
                        TextColor="Black"
                        AbsoluteLayout.LayoutBounds="0.5,630" AbsoluteLayout.LayoutFlags="XProportional"/>
  <!--Descripción-->
  <Label  Text="{Binding Adv.Description}"
          FontSize="15"
          TextColor="Black"
          AbsoluteLayout.LayoutBounds="0.5,670" AbsoluteLayout.LayoutFlags="XProportional"/>

  <!--Adaptar el boxView al contendio de la información de la mascota-->


</AbsoluteLayout>

And i want to show this stacklayout in all of the scrollview:


    <Button Command="{Binding AdoptedCommand}"
                                            IsVisible="{Binding IsVisibleAdopted}"
                    Text="{languages:TranslateExtension txt_adoptado}"
                    HorizontalOptions="Center"/>

    <Button Command="{Binding EditCommand}"
                                            IsVisible="{Binding IsVisibleEdit}"
                                            Text="{languages:TranslateExtension txt_editar}"
                                            HorizontalOptions="Center" />
  </StackLayout>

Thanks!

Sign In or Register to comment.