Xamarin Forms - slide text up behind image - c#

Within a grid I have an image then 2 stack layouts, one contains a row of icons and a button, and the one below contains a list of text items.
I have a function which, when the user click a button, the list animates upwards to effectively disappear, then downwards to reappear.
This works fine but the text is always visible over the image when animating up, is there a way to make the image always visible on top, so that it appears as if the text is sliding up behind the image?
Here is the code I use to animate the text stack:
public void ShowLess()
{
TopLayout.TranslateTo(0, -(TopLayout.Bounds.Height + 60), 500, Easing.Linear);
isIncreased = false;
}
public void ShowMore()
{
TopLayout.TranslateTo(0, 0, 500, Easing.Linear);
isIncreased = true;
}
And the XAML:
<ContentPage.Content>
<Grid BackgroundColor="#ede8db">
<Grid.RowDefinitions>
<RowDefinition Height="47.5*" />
<RowDefinition Height="5*" />
<RowDefinition Height="47.5*" />
</Grid.RowDefinitions>
<ratio:ContentRatioContainer Grid.Row="0">
<Image Aspect="AspectFill" Source="KevingroveCarouselImg.png" AbsoluteLayout.LayoutBounds="1,1,1,1" AbsoluteLayout.LayoutFlags="All" x:Name="bigImg" />
</ratio:ContentRatioContainer>
<artina:Button Margin="10,10,10,10" x:Name="ImgZoom" Clicked="EnlargeImage" HorizontalOptions="End" VerticalOptions="Start" Image="IncreaseImageIcon.png" BackgroundColor="Transparent" HeightRequest="30" WidthRequest="30"/>
<StackLayout Grid.Row="1" Orientation="Horizontal" BackgroundColor="#ede8db" Margin="0" Padding="30,0,30,0" x:Name="iconStack" >
<Label HorizontalTextAlignment="Center" Text="{x:Static ratio:FontAwesome.WHEELCHAIR_ALT}" Style="{StaticResource FontIcon}" TextColor="Black" FontSize="30" />
<Label HorizontalTextAlignment="Center" Text="{x:Static ratio:FontAwesome.CUTLERY}" Style="{StaticResource FontIcon}" TextColor="Black" FontSize="30" />
<Label HorizontalTextAlignment="Center" Text="{x:Static ratio:FontAwesome.WIFI}" Style="{StaticResource FontIcon}" TextColor="Black" FontSize="30" />
<Label HorizontalTextAlignment="Center" Text="{x:Static ratio:FontAwesome.CAMERA}" Style="{StaticResource FontIcon}" TextColor="Black" FontSize="30" />
<Label HorizontalTextAlignment="Center" Text="{x:Static ratio:FontAwesome.MAP}" Style="{StaticResource FontIcon}" TextColor="Black" FontSize="30" />
<!--<Label HorizontalTextAlignment="End" HorizontalOptions="End" Text="{x:Static ratio:FontAwesome.ARROW_DOWN}" Style="{StaticResource FontIcon}" TextColor="Gray" FontSize="30" />-->
<artina:Button x:Name="openStack" HorizontalOptions="End" VerticalOptions="Start" Text="{x:Static ratio:FontAwesome.ARROW_DOWN}"
Style="{StaticResource FontIcon}" BackgroundColor="Transparent" HeightRequest="30" WidthRequest="30" Clicked="btnClicked" TextColor="Gray"/>
</StackLayout>
<StackLayout Grid.Row="2" x:Name="articleInfo" Padding="30,0,30,0">
<StackLayout x:Name="TopLayout">
<StackLayout Orientation="Horizontal">
<Label HorizontalTextAlignment="Center" Text="{x:Static ratio:FontAwesome.WHEELCHAIR_ALT}" Style="{StaticResource FontIcon}" TextColor="Black" FontSize="30" />
<Label Text="Address" VerticalOptions="Center" HorizontalOptions="StartAndExpand" />
</StackLayout>
</StackLayout>
</StackLayout>
</Grid>
</ContentPage.Content>

The order in which you add your elements in XAML matters, so if you want to have something at the top, just add it and the end in XAML. So firstly add row 1 and row 2, and then after it row 1 with your image.
Alternatively you can call RaiseChild method on your container (grid) with the view you want to bring to the front as a parameter.

Related

Blank Space Visible on Xamarin Forms iOS Only

Problem with listview on Xamarin Forms iOS
Hello, I have a cross-platform app, I put a ListView with some items, on android it's all right, but on iOS there's a blank space that I'm not able to correct...
I've already reviewed the code and I can't find what's wrong.
Has anyone seen this error or already gone through it?
Here is my image:
Blank is my content page.
Yellow is my ListView.
The blue square is the blank space I can't remove.
Red is the header of my list.
Here is my code:
XAML
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="MensagemDoDia.Views.MensagemViews.MensagemDetailPage"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:extended="clr-namespace:MensagemDoDia.Engine.InfiniteScrolling"
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
xmlns:pancake="clr-namespace:Xamarin.Forms.PancakeView;assembly=Xamarin.Forms.PancakeView"
ios:Page.UseSafeArea="True">
<ContentPage.Content>
<Grid>
<ListView
BackgroundColor="Yellow"
CachingStrategy="RecycleElement"
HasUnevenRows="True"
ItemSelected="ListView_ItemSelected"
ItemsSource="{Binding ListaMensagem}"
Scrolled="ListView_Scrolled"
SeparatorVisibility="None">
<ListView.Behaviors>
<extended:InfiniteScrollBehavior IsLoadingMore="{Binding IsBusy}" />
</ListView.Behaviors>
<ListView.Header>
<StackLayout
Margin="{OnPlatform Android='10,0,10,0',
iOS='10,0,10,0'}"
BackgroundColor="Red"
HeightRequest="{OnPlatform Android=80,
iOS=70}"
Orientation="Horizontal">
<Button
Clicked="ButtonVoltar_Clicked"
Style="{StaticResource ButtonVoltarStyle}"
Text="{StaticResource FontAwesome_ArrowLeft}"
VerticalOptions="Center" />
<Label
x:Name="LabelNomeCategoria"
FontSize="Medium"
Opacity="0.7"
Style="{StaticResource LabelBoldStyle}"
VerticalTextAlignment="Center" />
</StackLayout>
</ListView.Header>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<pancake:PancakeView
Margin="10,5"
Padding="0"
BackgroundColor="WhiteSmoke"
CornerRadius="15"
VerticalOptions="CenterAndExpand">
<pancake:PancakeView.Shadow>
<pancake:DropShadow BlurRadius="1" Color="Black" />
</pancake:PancakeView.Shadow>
<Grid RowDefinitions="*, 50" RowSpacing="0">
<Frame
Padding="0"
BackgroundColor="Gray"
CornerRadius="15"
HasShadow="False"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
<Grid>
<Label
Margin="20,30"
FontAttributes="Bold"
FontSize="Medium"
HorizontalOptions="FillAndExpand"
HorizontalTextAlignment="Center"
Style="{StaticResource LabelMediumStyle}"
Text="{Binding MensagemTexto}"
TextColor="White"
TextType="Html"
VerticalOptions="FillAndExpand"
VerticalTextAlignment="Center" />
</Grid>
</Frame>
<Grid
Grid.Row="1"
ColumnDefinitions="*, auto, auto, auto"
ColumnSpacing="0">
<Label
Margin="15,0,0,0"
AutomationId="{Binding MensagemAutor}"
FontSize="Small"
HorizontalTextAlignment="Start"
LineBreakMode="TailTruncation"
MaxLines="1"
Opacity="0.7"
Style="{StaticResource LabelStyle}"
Text="{Binding MensagemAutor}"
TextColor="Black"
VerticalTextAlignment="Center">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="LabelAutor_Tapped" />
</Label.GestureRecognizers>
</Label>
<Button
Grid.Column="1"
AutomationId="{Binding Chave}"
Clicked="ButtonCopiarMensagem_Clicked"
CornerRadius="15"
FontFamily="{StaticResource FontAwesome}"
FontSize="Medium"
Style="{StaticResource ButtonIconeStyle}"
Text="{StaticResource FontAwesome_Paste}"
VerticalOptions="CenterAndExpand"
WidthRequest="45" />
<Button
x:Name="ButtonCompartilhar"
Grid.Column="2"
AutomationId="{Binding Chave}"
Clicked="ButtonCompartilhar_Clicked"
CornerRadius="15"
FontFamily="{StaticResource FontAwesome}"
FontSize="Medium"
Style="{StaticResource ButtonIconeStyle}"
Text="{StaticResource FontAwesome_ShareAll}"
VerticalOptions="CenterAndExpand"
WidthRequest="45" />
<Button
x:Name="ButtonFavorito"
Grid.Column="3"
Margin="0,0,5,0"
Clicked="ButtonFavoritar_Clicked"
CornerRadius="15"
FontFamily="{StaticResource FontAwesome}"
FontSize="Medium"
HorizontalOptions="EndAndExpand"
Style="{StaticResource ButtonIconeStyle}"
Text="{StaticResource FontAwesome_Heart}"
VerticalOptions="CenterAndExpand"
WidthRequest="45" />
</Grid>
</Grid>
</pancake:PancakeView>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.Footer>
<Grid Padding="6" IsVisible="{Binding IsBusy}">
<Grid.Triggers>
<Trigger TargetType="Grid" Property="IsVisible" Value="False">
<Setter Property="HeightRequest" Value="0" />
</Trigger>
</Grid.Triggers>
<Label
HorizontalOptions="Center"
Text="Loading..."
VerticalOptions="Center" />
</Grid>
</ListView.Footer>
</ListView>
</Grid>
</ContentPage.Content>
</ContentPage>
Add VerticalAlignment to the ListView and set it to be either Top or Stretch. Possibly do the same for StackLayout.
You can optionally remove the parent Grid if it is not holding other items than the ListView; hence making the ListView the sole child of the ContentPage which is valid.

How do I show first Grid row first when application load

It appears that my Grid layout is set for the the second row is displaying first.
When the application loads Grid.Row="2" which is the middle part of the page show first.
I have to scroll down to see the carousel witch Grid.Row="1"
I am trying to figure out the carousel the at the top then the video the the Change program last.
Here is my xaml code.
<ScrollView HorizontalOptions="Center">
<Grid x:Name="page" Padding="0,0">
<Grid.RowDefinitions>
<RowDefinition Height="600" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackLayout Grid.Row="0">
<CarouselView x:Name="carousel" Scrolled="Handle_Scrolled" ItemsSource="{Binding Items}"
VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
<CarouselView.Behaviors>
<behaviors:FrontBannerViewParallaxBehavior ParallaxOffset="100"/>
</CarouselView.Behaviors>
<CarouselView.ItemTemplate> <DataTemplate> <Grid Padding="18,24,18,64"> <custom:PancakeView
CornerRadius="24" BackgroundColor="#FFFFFF"> <StackLayout VerticalOptions="Fill"
HorizontalOptions="Fill"> <custom:PancakeView VerticalOptions="FillAndExpand" HeightRequest="200"
CornerRadius="10" BackgroundGradientStartColor="{Binding StartColor}"
BackgroundGradientEndColor="{Binding EndColor}"> <Grid> <StackLayout> <StackLayout
Orientation="Horizontal"> <Label Text="{Binding Title}" FontFamily="{StaticResource
font_extrabold}" HorizontalOptions="Center" TextColor="#60229a" VerticalOptions="End"
Margin="14,0,0,0" FontSize="36" FontAttributes="Bold" LineBreakMode="NoWrap" /> </StackLayout>
<Label FontFamily="{StaticResource font_regular}" Text="{Binding Details}" TextColor="#60229a"
Margin="14,8,24,24" FontSize="22" LineBreakMode="WordWrap" /> </StackLayout> </Grid>
</custom:PancakeView> </StackLayout> </custom:PancakeView> <Image Source="{Binding ImageSrc}"
WidthRequest="{Binding Width}" VerticalOptions="EndAndExpand" HorizontalOptions="EndAndExpand"
Margin="0,0,15,0" /> </Grid> </DataTemplate> </CarouselView.ItemTemplate>
</CarouselView>
</StackLayout>
<StackLayout Grid.Row="1">`
`<StackLayout Orientation="Horizontal">
<Label Text="Listen to Apostle Johnson's" FontFamily="{StaticResource
font_extrabold}" HorizontalOptions="Center" TextColor="#FFFFFF" VerticalOptions="End" Margin="14,0,0,0" FontSize="36" FontAttributes="Bold" LineBreakMode="NoWrap" />
</StackLayout>
<Label FontFamily="{StaticResource font_regular}" Text="Detox Transformation." TextColor="#FFFFFF" Margin="14,8,24,24" FontSize="22" LineBreakMode="WordWrap" />
<StackLayout Orientation="Horizontal">
<Label FontFamily="{StaticResource font_regular}" Text="Apostle Johnson gives a
riveting short bio of his testimony of traveling a road of living a life of descriptive chaos. Hey just click on the video and hear it from him." TextColor="#FFFFFF" Margin="14,8,24,24" FontSize="22" LineBreakMode="WordWrap" />
</StackLayout>
<StackLayout Orientation="Horizontal">
<ovideo:VideoPlayer x:Name="vmo" Source="http://iowegodministry.org/wp-content/uploads/2020/06/y2mate.com-FROM-GANGSTA-TO-GOD_JeR29HVa7HE_360p.mp4" WidthRequest="250" />
</StackLayout>
</StackLayout>
<StackLayout Grid.Row="2">
<StackLayout Orientation="Horizontal">
<Label Text="Chance Program" FontFamily="{StaticResource font_extrabold}" HorizontalOptions="Center" TextColor="#FFFFFF" VerticalOptions="End" Margin="14,0,0,0" FontSize="36" FontAttributes="Bold" LineBreakMode="NoWrap" />
</StackLayout>
<Label FontFamily="{StaticResource font_regular}" Text="The mission of C.H.A.N.C.E. is to help people succeed in the workforce by providing training and mentorship. One of the goals is to help those who've been in the prison system become successful members of society after they get out. The program will provide clas`enter code here`ses on a variety of spiritual-based educational curriculum, teach job interview skills, and help with strengthening family relationships and bonds." TextColor="#FFFFFF" Margin="14,8,24,24" FontSize="22" LineBreakMode="WordWrap" />
<Button BackgroundColor="#FFFFFF"
FontFamily="{StaticResource font_bold}"
Padding="20,0" CornerRadius="20"
TextColor="{Binding BackgroundColor}"
FontSize="12" BorderColor="{Binding BackgroundColor}"
BorderWidth="2" HeightRequest="40"
Text="Read More About the Program" HorizontalOptions="Center" Clicked="OnButtonClicked"
/>
</StackLayout>
</Grid>
</ScrollView>
From shared Xaml code , used ScrollView as RootLayout . ScrollView has a ScrollToAsync method to scroll to one position into View . You can have a try with this to scroll to your wanted position when application loads.
A position within a ScrollView can be scrolled to with the ScrollToAsync method that accepts double x and y arguments.
Given a vertical ScrollView object named scrollView, the following example shows how to scroll to 150 device-independent units from the top of the ScrollView:
await scrollView.ScrollToAsync(0, 150, true);

No button Clicking Event in xamarin form inside a DataTemplate

I am using swipecards in my xamarin form project.
This is my Xaml code--
<swipecards:CardStackView Grid.Row="0" x:Name="CardStackView" ItemsSource="{Binding Cards[0]}" Swiped="CardStackView_Swiped" StartedDragging="CardStackView_dragged" Margin="20" BackgroundColor="#E0E0E0">
<swipecards:CardStackView.ItemTemplate>
<DataTemplate>
<StackLayout Padding="0,2,0,2" x:Name="layout">
<StackLayout Orientation="Horizontal" VerticalOptions="Start">
<Label Text="{Binding .FullJobName}" HorizontalOptions="Start" Style="{DynamicResource TitleStyle}" />
<Grid>
<Image x:Name="MyImage" Source="{Binding .CompanyProfImg}" HorizontalOptions="End" HeightRequest="50" WidthRequest="50" />
<ActivityIndicator BindingContext="{x:Reference MyImage}" IsRunning="{Binding IsLoading}}"/>
</Grid>
</StackLayout>
<StackLayout HorizontalOptions="StartAndExpand">
<Label Text="{Binding .LocationName}" HorizontalOptions="StartAndExpand" Style="{DynamicResource SubtitleTextStyle}" />
<Label Text="{Binding .TotalSalary }" Style="{DynamicResource SubtitleTextStyle}" />
</StackLayout>
<StackLayout>
<Label Text="Comapny Name" Style="{DynamicResource TitleStyle}" HorizontalOptions="StartAndExpand"/>
<Label Text="{Binding .CompanyName}" Style="{DynamicResource ListItemTextStyle}" HorizontalOptions="StartAndExpand"/>
</StackLayout>
<StackLayout>
<Label Text="Key Skills" Style="{DynamicResource TitleStyle}" HorizontalOptions="StartAndExpand"/>
<Label Text="{Binding .Skills}" Style="{DynamicResource ListItemTextStyle}" HorizontalOptions="StartAndExpand"/>
</StackLayout>
<StackLayout>
<Label Text="Job Description" FontAttributes="Bold" FontSize="14" HorizontalOptions="StartAndExpand"/>
<Label Text="{Binding .Description}" Style="{DynamicResource ListItemTextStyle}" HorizontalOptions="StartAndExpand"/>
</StackLayout>
<BoxView Color="#DCDCDC" WidthRequest="160" HeightRequest="2" />
<StackLayout Orientation="Horizontal" HorizontalOptions="StartAndExpand" VerticalOptions="EndAndExpand">
<Label Text="{Binding .Postedby}" HorizontalOptions="Start" Style="{DynamicResource CaptionStyle}" />
<!--<Image x:Name="fb_imageTag" Source="facebooklogo.png">
<Image.GestureRecognizers>
<TapGestureRecognizer Tapped="ReadMore_Clicked" />
</Image.GestureRecognizers>
</Image>-->
<Button Text="Delete" Clicked="DeleteClicked"/>
</StackLayout>
</StackLayout>
</DataTemplate>
</swipecards:CardStackView.ItemTemplate>
</swipecards:CardStackView>
The problem is the button is not clicking inside the Data template.
Can you guys please help me what should i do now?
Thank you..
Hard to say what is wrong. Could you show full xaml code, view code behind and your viewmodel
Is DeleteClicked is in code behind or in VM?

Xamarin forms order draw of components

I'm having a problem with the orders of the components of my main page, in this case I have her divided into three parts, Top, Boddy and Botton, Y make the search with auto complete and the component ListView Lower my boddy
<StackLayout x:Name="MainContext"
Spacing="0"
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,Property=Width,Factor=1,Constant=0}"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,Property=Height,Factor=1,Constant=0}" >
<StackLayout.GestureRecognizers>
<TapGestureRecognizer Tapped="OnSelectMenuTapGestureTap"
NumberOfTapsRequired="1" />
</StackLayout.GestureRecognizers>
<!-- Main manu -->
<!-- Margin IOS-->
<StackLayout HeightRequest="20"
VerticalOptions="Start"
BackgroundColor="#5AC8FA"/>
<!-- end Margin IOS-->
<StackLayout x:Name="TopBar"
BackgroundColor="#5AC8FA"
VerticalOptions="Start"
HeightRequest="50"
Orientation="Horizontal">
<StackLayout x:Name="ContainerTitleLabel"
HorizontalOptions="FillAndExpand"
VerticalOptions="Center"
Orientation="Horizontal">
<Button Command="{Binding MainMenuCmd}"
BackgroundColor="Transparent"
BorderColor="Transparent"
HorizontalOptions="Start"
WidthRequest="{Binding WidthMenuRequest}"
HeightRequest="{Binding HeightMenuRequest}"
Image="icon_menu"
Margin="5,0"/>
<Label x:Name="TitleLb"
Text="{Binding TitleLb}"
VerticalOptions="Center"
HorizontalOptions="CenterAndExpand"
TextColor="Black"/>
<Button HorizontalOptions="End"
VerticalOptions="Center"
Image="icon_search"
Command = "{Binding ShowSearchCmd}"
BorderColor="Transparent"
BackgroundColor="Transparent"/>
</StackLayout>
<StackLayout x:Name="ContainerSearch"
HorizontalOptions="Start"
VerticalOptions="Center"
Orientation="Horizontal"
IsVisible="false">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width = "7*" />
<ColumnDefinition Width = "3*" />
</Grid.ColumnDefinitions>
<MarkupsInterfaces:SearchBarAutoComplet Grid.Column="0"
x:Name="SearchBar"
HorizontalOptions="Start"
TextColor="White"
PlaceholderColor="White"
CancelButtonColor="Black"
Placeholder="{MarkupsInterfaces:TranslateExtension Search}">
</MarkupsInterfaces:SearchBarAutoComplet>
<Button Grid.Column="1"
HorizontalOptions="End"
VerticalOptions="Center"
Text="{MarkupsInterfaces:TranslateExtension Close}"
Command="{Binding CloseSearchCmd}"
FontSize="12"
BackgroundColor="#5AC8FA"/>
</Grid>
</StackLayout>
</StackLayout>
<!--End Main Menu -->
<!--Boddy Context-->
<StackLayout x:Name="Boddy"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
Orientation="Horizontal">
</StackLayout>
<!--End Boddy Context-->
<StackLayout BackgroundColor="White"
VerticalOptions="End"
HorizontalOptions="FillAndExpand">
<!--Botton menu navigation-->
<Grid HorizontalOptions="FillAndExpand"
VerticalOptions="Fill"
ColumnSpacing="-5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!--Btn Scanner-->
<Button Grid.Column="1"
x:Name="BtnScneer"
Command="{Binding ScannerTabCmd}"
BackgroundColor="White"
Image="icon_scanner"
HorizontalOptions="FillAndExpand"
Margin="{Binding MarginButtons}"/>
<!--Btn Coupons-->
<Button Grid.Column="2"
x:Name="BtnCoupons"
BackgroundColor="White"
Image="icon_coupon"
HorizontalOptions="FillAndExpand"
Margin="{Binding MarginButtons}"/>
<BoxView x:Name="IndicationCoupons"
Grid.Column="2"
VerticalOptions="End"
HorizontalOptions="FillAndExpand"
HeightRequest="8"
BackgroundColor="#5AC8FA"
IsVisible="false"
Margin="5,0"/>
<!--Btn Promotions-->
<Button Grid.Column="3"
x:Name="BtnPromotions"
BackgroundColor="White"
HorizontalOptions="FillAndExpand"
Image="icon_promotions"
Margin="{Binding MarginButtons}"/>
<BoxView x:Name="IndicationPromotions"
Grid.Column="3"
VerticalOptions="End"
HorizontalOptions="FillAndExpand"
HeightRequest="8"
BackgroundColor="#5AC8FA"
IsVisible="false"
Margin="5,0"/>
<!--Btn Maket car -->
<Button Grid.Column="4"
x:Name="BtnMarketCar"
BackgroundColor="White"
VerticalOptions="Center"
HorizontalOptions="FillAndExpand"
Image="icon_market_car"
Margin="{Binding MarginButtons}"/>
<BoxView x:Name="IndicationMarketCar"
VerticalOptions="End"
HorizontalOptions="FillAndExpand"
Grid.Column="4"
HeightRequest="8"
BackgroundColor="#5AC8FA"
IsVisible="false"
Margin="5,0"/>
<!--Btn Favorites-->
<Button Grid.Column="5"
x:Name="BtnFavorites"
BackgroundColor="White"
VerticalOptions="Center"
HorizontalOptions="FillAndExpand"
Image="icon_favorite"
Margin="{Binding MarginButtons}"/>
<BoxView x:Name="IndicationFavorites"
Grid.Column="5"
VerticalOptions="End"
HorizontalOptions="FillAndExpand"
HeightRequest="8"
BackgroundColor="#5AC8FA"
IsVisible="false"
Margin="5,0"/>
</Grid>
<!--End bottom menu navigation-->
</StackLayout>
</StackLayout>
the content of body is dynamic, and my problen is
As a possibility to force the top to always be on the whole context

Image in front off text?

So with this code my image is over the text, how do i get the image in front of the text?
<StackLayout Orientation="Vertical" BackgroundColor="DeepSkyBlue" >
<Image Source="{Binding Image}" />
<Label Text="{Binding Name}" TextColor="Black" FontSize="Medium" />
<Label Text="{Binding Tlfnr}" TextColor="Black" FontSize="Small" />
</StackLayout>
<StackLayout Orientation="Horizontal" BackgroundColor="DeepSkyBlue" >
<Image Source="{Binding Image}" />
<StackLayout Orientation="Vertical">
<Label Text="{Binding Name}" TextColor="Black" FontSize="Medium" />
<Label Text="{Binding Tlfnr}" TextColor="Black" FontSize="Small" />
</StackLayout>
</StackLayout>

Categories

Resources