Open microspaze opened 1 year ago
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.
Verified this on Visual Studio Enterprise 17.8.0 Preview 1.0 using below Project (.NET 8.0), This issue repro on Windows 11, iOS 16.4 and Android 13.0-API33. MauiApp3.zip Windows 11 iOS 16.4 Android 13.0-API33
Description
Label's width can't full fill Grid's * (GridUnitType.Star) space when Grid has a Horizontal padding, the label's width depends on its content's actual width, but it will affect the whole grid width. NO MATTER what layout or view wrapper the label with HorizontalOptions="FillAndExpand", its width will be sticky to the label's width.
Tested on net7-ios and net8-ios (preview-7), all have this bug. (Android is OK)
The first 3 blocks end with green square has a Padding="10" property. [WRONG] The last 3 blocks end with blue square has a Margin="10" property. [RIGHT]
The first 3 blocks end with green square has a Padding="0,10" property. [RIGHT] The last 3 blocks end with blue square has a Margin="10" property. [RIGHT]
Steps to Reproduce
<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="MauiOne.MainPage">
Link to public reproduction project repository
No response
Version with bug
7.0.92
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 16.4
Did you find any workaround?
Use Margin to replace Padding property.
Relevant log output
No response