From 859d1aae9799894a8580e7ea8938fc0215e7cab3 Mon Sep 17 00:00:00 2001 From: David Britch Date: Tue, 29 Oct 2024 10:27:25 +0000 Subject: [PATCH] Button changes on iOS. (#2586) --- docs/user-interface/controls/button.md | 5 ++++- docs/whats-new/dotnet-9.md | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/user-interface/controls/button.md b/docs/user-interface/controls/button.md index 488e7fbd..b286ceb2 100644 --- a/docs/user-interface/controls/button.md +++ b/docs/user-interface/controls/button.md @@ -1,7 +1,7 @@ --- title: "Button" description: "The .NET MAUI Button displays text and responds to a tap or click that directs an app to carry out a task." -ms.date: 08/30/2024 +ms.date: 10/29/2024 --- # Button @@ -344,6 +344,9 @@ Button button = new Button }; ``` +> [!NOTE] +> If a contains text and an image it might not be possible to fit all the content inside the button, and so you should size your image manually to achieve your desired layout. + ## Disable a Button Sometimes an app enters a state where a click is not a valid operation. In such cases, the can be disabled by setting its `IsEnabled` property to `false`. diff --git a/docs/whats-new/dotnet-9.md b/docs/whats-new/dotnet-9.md index 196e34c0..f508b65b 100644 --- a/docs/whats-new/dotnet-9.md +++ b/docs/whats-new/dotnet-9.md @@ -161,6 +161,10 @@ AppContext.SetSwitch("BlazorWebView.AndroidFireAndForgetAsync", true); This switch enables to fire and forget the async disposal that occurs, and as a result fixes the majority of the disposal deadlocks that occur on Android. For more information, see [Fix disposal deadlocks on Android](~/user-interface/controls/blazorwebview.md#fix-disposal-deadlocks-on-android). +### Buttons on iOS + + controls on iOS now respect spacing, padding, border width, and margins more accurately than in previous releases. A large image in a will now be resized to the maximum size, taking into account the spacing, padding, border width, and margins. However, if a contains text and an image it might not be possible to fit all the content inside the button, and so you should size your image manually to achieve your desired layout. + ### CollectionView and CarouselView .NET MAUI 9 includes two optional new handlers on iOS and Mac Catalyst that bring performance and stability improvements to `CollectionView` and `CarouselView`. These handlers are based on `UICollectionView` APIs.