Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/migration/includes/api-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ In addition, all of the numeric values in a <xref:Microsoft.Maui.Graphics.Color?

The following table lists the layout APIs that have been removed in the move from Xamarin.Forms to .NET MAUI:

::: moniker range="=net-maui-7.0"

> [!div class="mx-tdBreakAll"]
> | Xamarin.Forms API | .NET MAUI API | Comments |
> | ----------------- | ------------- | -------- |
Expand All @@ -46,6 +48,20 @@ The following table lists the layout APIs that have been removed in the move fro
> | <xref:Xamarin.Forms.Grid.IGridList`1.AddVertical%2A?displayProperty=fullName> | | No .NET MAUI equivalent. |
> | <xref:Xamarin.Forms.RelativeLayout?displayProperty=fullName> | <xref:Microsoft.Maui.Controls.Compatibility.RelativeLayout?displayProperty=fullName> | In .NET MAUI, `RelativeLayout` only exists as a compatibility control for users migrating from Xamarin.Forms. Use <xref:Microsoft.Maui.Controls.Grid> instead, or add the `xmlns` for the compatibility namespace. |

::: moniker-end

::: moniker range=">=net-maui-8.0"

> [!div class="mx-tdBreakAll"]
> | Xamarin.Forms API | .NET MAUI API | Comments |
> | ----------------- | ------------- | -------- |
> | <xref:Xamarin.Forms.AbsoluteLayout.IAbsoluteList`1.Add%2A?displayProperty=fullName> | | The `Add` overload that accepts 3 arguments isn't present in .NET MAUI. |
> | <xref:Xamarin.Forms.Grid.IGridList`1.AddHorizontal%2A?displayProperty=fullName> | | No .NET MAUI equivalent. |
> | <xref:Xamarin.Forms.Grid.IGridList`1.AddVertical%2A?displayProperty=fullName> | | No .NET MAUI equivalent. |
> | <xref:Xamarin.Forms.RelativeLayout?displayProperty=fullName> | <xref:Microsoft.Maui.Controls.Compatibility.RelativeLayout?displayProperty=fullName> | In .NET MAUI, `RelativeLayout` only exists as a compatibility control for users migrating from Xamarin.Forms. Use <xref:Microsoft.Maui.Controls.Grid> instead, or add the `xmlns` for the compatibility namespace. |

::: moniker-end

In addition, adding children to a layout in code in Xamarin.Forms is accomplished by adding the children to the layout's `Children` collection:

```csharp
Expand Down
7 changes: 7 additions & 0 deletions docs/user-interface/layouts/grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,13 @@ public class BasicGridPage : ContentPage

In code, to specify the height of a `RowDefinition` object, and the width of a `ColumnDefinition` object, you use values of the `GridLength` structure, often in combination with the `GridUnitType` enumeration.

::: moniker range=">=net-maui-8.0"

> [!NOTE]
> <xref:Microsoft.Maui.Controls.Grid> also defines an `AddWithSpan` extension method that adds a view to the `Grid` at the specified row and column with the specified row and column spans.

::: moniker-end

### Simplify row and column definitions

In XAML, the row and column characteristics of a <xref:Microsoft.Maui.Controls.Grid> can be specified using a simplified syntax that avoids having to define `RowDefinition` and `ColumnDefinition` objects for each row and column. Instead, the `RowDefinitions` and `ColumnDefinitions` properties can be set to strings containing comma-delimited `GridUnitType` values, from which type converters built into .NET MAUI create `RowDefinition` and `ColumnDefinition` objects:
Expand Down
4 changes: 3 additions & 1 deletion docs/whats-new/dotnet-8.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ For information about what's new in .NET 8, see [What's new in .NET 8](/dotnet/c
- The position at which a drag or drop gesture occurred can be obtained by calling the `GetPosition` method on a <xref:Microsoft.Maui.Controls.DragEventArgs>, <xref:Microsoft.Maui.Controls.DragStartingEventArgs>, or <xref:Microsoft.Maui.Controls.DropEventArgs> object. For more information, see [Recognize a drag and drop gesture](~/fundamentals/gestures/drag-and-drop.md).
- <xref:Microsoft.Maui.Controls.WebView> gains a `UserAgent` property. For more information, see [WebView](~/user-interface/controls/webview.md).
- Inline media playback of HTML5 video, including autoplay and picture in picture, has been enabled by default for the <xref:Microsoft.Maui.Controls.WebView> on iOS. For more information, see [Set media playback preferences on iOS and Mac Catalyst](~/user-interface/controls/webview.md#set-media-playback-preferences-on-ios-and-mac-catalyst).
- Reources defined in a <xref:Microsoft.Maui.Controls.ResourceDictionary> can also be consumed in an [`AppThemeBinding`](xref:Microsoft.Maui.Controls.Xaml.AppThemeBindingExtension) with the [`DynamicResource`](xref:Microsoft.Maui.Controls.Xaml.DynamicResourceExtension) markup extension. For more information, see [Define and consume theme resources](~/user-interface/system-theme-changes.md#define-and-consume-theme-resources).
- Resources defined in a <xref:Microsoft.Maui.Controls.ResourceDictionary> can also be consumed in an [`AppThemeBinding`](xref:Microsoft.Maui.Controls.Xaml.AppThemeBindingExtension) with the [`DynamicResource`](xref:Microsoft.Maui.Controls.Xaml.DynamicResourceExtension) markup extension. For more information, see [Define and consume theme resources](~/user-interface/system-theme-changes.md#define-and-consume-theme-resources).
- The `Grid.Add` overload that accepts 5 arguments has been added back to .NET MAUI. However, this method is deprecated and is only present to aid migrations from Xamarin.Forms.
- <xref:Microsoft.Maui.Controls.Grid> gains an `AddWithSpan` extension method that adds a view to the `Grid` at the specified row and column with the specified row and column spans.

The following types or members have been deprecated:

Expand Down