This repository was archived by the owner on May 1, 2024. It is now read-only.

Description
Description
I have did a little modification in sample code from here:
https://docs.microsoft.com/en-us/samples/xamarin/xamarin-forms-samples/customrenderers-view/
and I have added a button to change the visibility of camera preview control. On Android everything works fine:

But on iOS the camera preview is not displayed. You can check this by lanching this project on a real iPhone device.
Xamarin_Forms___View_Custom_Renderer.zip
This is because I have set the CameraPreview control to have IsVisible property to be initially false
<controls:CameraPreview x:Name="cameraPreview" IsVisible="False" Camera="Rear" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" />
If we remove IsVisible="False" it works fine.
Steps to Reproduce
- Launch the project which I have pasted above on a real iPhone device.
- Click the "show" button to show the camera preview.
- As you can see camera preview is not displayed.
- Run the same project on Android.
- Click the "show" button.
- As you can see camera view is displayed fine
Expected Behavior
Camera preview should be displayed fine on both iOS and Android.
Actual Behavior
Camera preview is displayed only on Android.
Basic Information
- Version with issue: 4.4.0.991265
- Last known good version: none
- IDE: Visual Studio 2019 16.4.5
- Platform Target Frameworks: