Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
144047 | Apr 16,2019 06:54 AM UTC | Jun 29,2020 10:23 PM UTC | Xamarin.Forms | 8 |
![]() |
Tags: SfCarousel |
Hi,
Thanks for the response, but unfortunately your solution does not meet my requirements, See attached for what I get and what I'm looking for.
Example1.png - the image with the yellow space is what I get from your code. As you can see it doesn't fill up the screen. Note the yellow space that I have marked in red. This is not what I want.
Instead, I'd like my current item to fill up the screen like shown in the Example2.png.
Platform - Xamarin Forms targeting just IOS.
Also it is worth mentioning that my main item data is not an image view, but instead an absolutelayout that has other children views within it.
Thanks again and kind regards
<ContentPage.Resources>
<ResourceDictionary>
<DataTemplate x:Key="itemTemplate">
<Image Source="user.png" Aspect="Fill" HeightRequest="2000" WidthRequest="300"/>
</DataTemplate>
</ResourceDictionary>
</ContentPage.Resources>
<ContentPage.Content>
<AbsoluteLayout BackgroundColor="Yellow">
<syncfusion:SfCarousel x:Name="carousel" ItemHeight="650" ItemTemplate="{StaticResource itemTemplate}" ItemsSource="{Binding ImageCollection}" ViewMode="Linear" />
</AbsoluteLayout>
</ContentPage.Content>
|
public partial class App : Application { public static int ScreenWidth; public static int ScreenHeight; } |
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { App.ScreenWidth = (int)UIScreen.MainScreen.Bounds.Width; App.ScreenHeight = (int)UIScreen.MainScreen.Bounds.Height; } |
carousel.ItemHeight = App.ScreenHeight;
carousel.ItemWidth = App.ScreenWidth; |
Hi there,Thank you for your help. Much appreciated, but I have found a different solution for my requirements.Kind regardsLirbuj
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.