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

MaximumWidthRequest actually set WidthRequest. #11725

Closed
KSemenenko opened this issue Nov 29, 2022 · 6 comments
Closed

MaximumWidthRequest actually set WidthRequest. #11725

KSemenenko opened this issue Nov 29, 2022 · 6 comments
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter layout-stack platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@KSemenenko
Copy link
Contributor

KSemenenko commented Nov 29, 2022

Description

I want my StackLayout to expand but no more than 450px.
But this property actually sets the width.

<StackLayout Margin="24,0" Spacing="16" HorizontalOptions="Center" MaximumWidthRequest="450" >
    <BoxView HeightRequest="24" Color="{StaticResource BackgroundMain}"/>	 
    <Button Style="{StaticResource SecondaryDefaultBig}" Text="{x:Static Localizations:AppResources.CANCEL}" Clicked="Cancel_Clicked" />
</StackLayout>

Steps to Reproduce

Set MaximumWidthRequest to layout wich use Margin and stretching.

https://github.com/dotnet/maui/files/10117140/WidthIssue.zip

Link to public reproduction project repository

no

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS

Affected platform versions

iOS/android

Did you find any workaround?

On the one hand a logical name, but on the other hand how do I set the maximum width of the component?

Relevant log output

No response

@KSemenenko KSemenenko added the t/bug Something isn't working label Nov 29, 2022
@hartez
Copy link
Contributor

hartez commented Nov 29, 2022

If you remove the BoxView, does it work as expected?

@hartez hartez added the s/needs-info Issue needs more info from the author label Nov 29, 2022
@ghost
Copy link

ghost commented Nov 29, 2022

Hi @KSemenenko. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@jsuarezruiz jsuarezruiz added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Nov 29, 2022
@KSemenenko
Copy link
Contributor Author

I did repo for it.
so in original case seems it's ok, it depend on conent but for HorizontalOptions="Fill" it's not working.
But as for me it have to work, becase maybe I would like to limit Fill with MaximumWidthRequest

WidthIssue.zip

Screenshot 2022-11-29 at 21 39 32

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Nov 29, 2022
@PureWeen PureWeen removed the s/needs-attention Issue has more information and needs another look label Nov 30, 2022
@PureWeen PureWeen added this to the Backlog milestone Nov 30, 2022
@ghost
Copy link

ghost commented Nov 30, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jun 8, 2023
@XamlTest
Copy link

XamlTest commented Jun 8, 2023

Verified this on Visual Studio Enterprise 17.7.0 Preview 1.0. Repro on Android 13.0-API33 and iOS 16.4 with provided Project:
WidthIssue.zip

image

@hartez
Copy link
Contributor

hartez commented Jun 9, 2023

The issue with "Fill" was fixed by #15022.

@hartez hartez closed this as completed Jun 9, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter layout-stack platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants