janusw / Camera.Maui

A CameraView Control for .NET Maui
MIT License
18 stars 3 forks source link

Preview doesn´t expand to its parent #13

Open LBoullosa opened 7 months ago

LBoullosa commented 7 months ago

Hi Janusw,

Is there any option to expand the cameraview to its parent?

I don´t know why it is showing both empty areas in the left and right, i don´t have any margin, padding or layout to make it centered. The green color I setted it with

image

image

I noticed that MauiCameraView is extended from GridLayout, maybe this is the secret which causes this behaviour. But I guess this could be a bug. What do you think about it?

image

Thanks in advance!

janusw commented 6 months ago

Actually the sample app has a fullscreen page where expanding works well (when wrapped inside a Grid):

https://github.com/janusw/Camera.Maui/blob/b6b36830b8456a2d034a14b2e209c0303da565a5/Camera.MAUI.Test/FullScreenPage.xaml#L7-L10

LBoullosa commented 6 months ago

Well, In my case it´s wrapped inside a bunch of stacklayout with VerticalOptions="FillAndExpand", HorizontalOptions="FillAndExpand" and finally with a Frame (I tried with a Border but it´s not presented any preview).

I will try to reproduce it isolating from my app.