Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview doesn´t expand to its parent #13

Open
LBoullosa opened this issue Feb 26, 2024 · 2 comments
Open

Preview doesn´t expand to its parent #13

LBoullosa opened this issue Feb 26, 2024 · 2 comments

Comments

@LBoullosa
Copy link

LBoullosa commented Feb 26, 2024

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
Copy link
Owner

janusw commented Mar 22, 2024

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

<Grid HorizontalOptions="Fill" VerticalOptions="Fill">
<cv:CameraView x:Name="cameraView" HorizontalOptions="Fill" VerticalOptions="Fill"/>
<Button x:Name="controlButton" Text="Play" TextColor="DarkGray" VerticalOptions="End" HorizontalOptions="Center" Clicked="Button_Clicked" Margin="15" Background="#66666666"/>
</Grid>

@LBoullosa
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants