[Bug] Image sizing problem with CarouselView inside an Expander #509
Description
Description
The Expander control behaves strangely when a CarouselView is set as its content. The images are being shown as thumbnails instead of their acutal size after the content is collapsed. See the included .GIF-file.
Steps to Reproduce
- Setup the Expander control according to the official documentation.
- Inside the Expander, add a CarouselView as the Content.
- Feed the CarouselView with a few images (web-source).
See the code below:
<Expander.Header> // Some labels ... </Expander.Header> <StackLayout> <CarouselView HeightRequest="240" IndicatorView="indicatorView" ItemsSource="{Binding Images}"> <CarouselView.ItemTemplate> <DataTemplate> <Image Aspect="AspectFit" IsOpaque="True" Source="{Binding Value}" /> </DataTemplate> </CarouselView.ItemTemplate> </CarouselView> <IndicatorView x:Name="indicatorView" HorizontalOptions="Center" IndicatorColor="LightGray" SelectedIndicatorColor="DarkGray" /> </StackLayout> </Expander>
Expected Behavior
You should be able to hide/show the CarouselView inside the Expander without the images being shown as thumbnails.
Actual Behavior
The images inside the CarouselView are shown as thumbnails when the content is collapsed/shown. Please see the included .GIF file.
Basic Information
- Version with issue: Xamarin.Forms version: 4.7.0.1239
- Last known good version: Unknown
- IDE: Visual Studio 2019 Pro, v. 16.5.4
- Platform Target Frameworks:
- Android: Android 9.0 (API Level 28)
- Android Support Library Version: v28.0.0.3
- Affected Devices:
- Samsung S10+ (physical device)
- Pixel 2 (emulator)