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

[Enhancement] Support Min|Max Height|Width on FrameworkElement #709

Closed
YZahringer opened this issue Apr 12, 2021 · 0 comments · Fixed by #2265
Closed

[Enhancement] Support Min|Max Height|Width on FrameworkElement #709

YZahringer opened this issue Apr 12, 2021 · 0 comments · Fixed by #2265
Assignees
Labels
fixed-in-6.0.100-rc.1.7 Look for this fix in 6.0.100-rc.1.7! fixed-in-6.0.101-preview.10 Look for this fix in 6.0.101-preview.10! proposal/open t/enhancement ☀️ New feature or request
Milestone

Comments

@YZahringer
Copy link
Contributor

Summary

Support Minimum and Maximum Width or Height of .NET MAUI elements.

Same as WinUI:

API Changes

interface IFrameworkElement
{
    ...
    double MinHeight { get; set; }
    double MaxHeight { get; set; }

    double MinWidth { get; set; }
    double MaxWidth { get; set; }
}

Intended Use Case

Define more responsive & dynamic UI element sizes

@hartez hartez self-assigned this Aug 25, 2021
hartez added a commit that referenced this issue Aug 25, 2021
rmarinho pushed a commit that referenced this issue Aug 27, 2021
* Min/max height/width for Android/iOS/Windows
Fixes #709

* Set up constants for Core min/max/explicit default values

* Fix up device tests and directly set Windows height/width

* Add implementation to benchmark stub; make negative dimension exceptions consistent

* Check for unset values in min height/width VisualElement properties

* Remove now irrelevant comments

* Use correct property

* Remove the tests that no longer make any sense

* Not sure how this test ever worked

* shrug

* Cleanup

* Use correct version of Width/Height for ScrollView

* Use measurespec instead of raw values when measuring PageViewGroup

* Don't let VET force the page back to 0x0

* Stomp out another -1

* Use correct unset value

* stomp stomp stomp

* Add extra MauiContext null check for when the old layout system tries to force a layout too early

* Enable AbsoluteLayout for iOS

Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
@Redth Redth closed this as completed in f52f676 Aug 28, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Feb 19, 2022
@samhouts samhouts added fixed-in-6.0.101-preview.10 Look for this fix in 6.0.101-preview.10! fixed-in-6.0.100-rc.1.7 Look for this fix in 6.0.100-rc.1.7! labels Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-6.0.100-rc.1.7 Look for this fix in 6.0.100-rc.1.7! fixed-in-6.0.101-preview.10 Look for this fix in 6.0.101-preview.10! proposal/open t/enhancement ☀️ New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@Redth @hartez @YZahringer @samhouts and others