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
21 changes: 19 additions & 2 deletions docs/user-interface/pages/contentpage.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ContentPage"
description: "The .NET MAUI ContentPage displays a single view, which is often a layout, and is the most common page type."
ms.date: 03/14/2022
ms.date: 10/27/2023
---

# ContentPage
Expand All @@ -10,7 +10,24 @@ ms.date: 03/14/2022

The .NET Multi-platform App UI (.NET MAUI) <xref:Microsoft.Maui.Controls.ContentPage> displays a single view, which is often a layout such as as <xref:Microsoft.Maui.Controls.Grid> or <xref:Microsoft.Maui.Controls.StackLayout>, and is the most common page type.

<xref:Microsoft.Maui.Controls.ContentPage> defines a `Content` property, of type <xref:Microsoft.Maui.Controls.View>, which defines the view that represents the page's content. This property is backed by a <xref:Microsoft.Maui.Controls.BindableProperty> object, which means that it can be the target of data bindings, and styled. In addition, <xref:Microsoft.Maui.Controls.ContentPage> inherits `Title`, `IconImageSource`, `BackgroundImageSource`, `IsBusy`, and `Padding` bindable properties from the <xref:Microsoft.Maui.Controls.Page> class.
::: moniker range="=net-maui-7.0"

<xref:Microsoft.Maui.Controls.ContentPage> defines the `Content` property, of type <xref:Microsoft.Maui.Controls.View>, which defines the view that represents the page's content. This property is backed by a <xref:Microsoft.Maui.Controls.BindableProperty> object, which means that it can be the target of data bindings, and styled.

::: moniker-end

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

<xref:Microsoft.Maui.Controls.ContentPage> defines the following properties:

- `Content` property, of type <xref:Microsoft.Maui.Controls.View>, which defines the view that represents the page's content.
- `HideSoftInputOnTapped`, of type `bool`, which indicates whether tapping anywhere on the page will cause the soft input keyboard to hide if it's visible.

These properties are backed by <xref:Microsoft.Maui.Controls.BindableProperty> objects, which means that they can be the target of data bindings, and styled.

::: moniker-end

In addition, <xref:Microsoft.Maui.Controls.ContentPage> inherits `Title`, `IconImageSource`, `BackgroundImageSource`, `IsBusy`, and `Padding` bindable properties from the <xref:Microsoft.Maui.Controls.Page> class.

> [!NOTE]
> The `Content` property is the content property of the <xref:Microsoft.Maui.Controls.ContentPage> class, and therefore does not need to be explicitly set from XAML.
Expand Down
1 change: 1 addition & 0 deletions docs/whats-new/dotnet-8.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ For information about what's new in .NET 8, see [What's new in .NET 8](/dotnet/c
- Window management can be decoupled from the `App` class. For more information, see [Decouple window management from the App class](~/fundamentals/windows.md#decouple-window-management-from-the-app-class).
- Menu bar items and context menu items can be invoked through keyboard shortcuts known as keyboard accelerators. For more information, see [Keyboard accelerators](~/user-interface/keyboard-accelerators.md).
- The <xref:Microsoft.Maui.Devices.Sensors.Geolocation> class can listen for location changes when app's are in the foreground. For more information, see [Listen for location changes](~/platform-integration/device/geolocation.md#listen-for-location-changes).
- The <xref:Microsoft.Maui.Controls.ContentPage> class gains a `HideSoftInputOnTapped` property, which indicates whether tapping anywhere on the page will cause the soft input keyboard to hide if it's visible. For more information, see [ContentPage](~/user-interface/pages/contentpage.md).

The following types or members have been deprecated:

Expand Down