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
2 changes: 1 addition & 1 deletion docs/tutorials/notes-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ The previous XAML introduces a few new concepts:

- The `ContentPage.ToolbarItems` property contains a `ToolbarItem`. The buttons defined here are usually display at the top of the app, along the page title. Depending on the platform, though, it might be in a different position. When one of these buttons is pressed, the `Clicked` event is raised, just like a normal button.

The `ToolbarItem.IconImageSource` property sets the icon to display on the button. The icon can be any image resource defined by the project, however, in this example, a `FontImage` is used. A `FontImage` can use a single glyph from a font as an image.
The `ToolbarItem.IconImageSource` property sets the icon to display on the button. The icon can be any image resource defined by the project, however, in this example, a `FontImageSource` is used. A `FontImageSource` can use a single glyph from a font as an image.

- The <xref:Microsoft.Maui.Controls.CollectionView> control displays a collection of items, and in this case, is bound to the model's `Notes` property. The way each item is presented by the collection view is set through the `CollectionView.ItemsLayout` and `CollectionView.ItemTemplate` properties.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
x:DataType="models:AllNotes">
<!-- Add an item to the toolbar -->
<ContentPage.ToolbarItems>
<ToolbarItem Text="Add" Clicked="Add_Clicked" IconImageSource="{FontImage Glyph='+', Color=Black, Size=22}" />
<ToolbarItem Text="Add" Clicked="Add_Clicked" IconImageSource="{FontImageSource Glyph='+', Color=Black, Size=22}" />
</ContentPage.ToolbarItems>

<!-- Display notes in a list -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<!-- Add an item to the toolbar -->
<ContentPage.ToolbarItems>
<ToolbarItem Text="Add" Command="{Binding NewCommand}" IconImageSource="{FontImage Glyph='+', Color=Black, Size=22}" />
<ToolbarItem Text="Add" Command="{Binding NewCommand}" IconImageSource="{FontImageSource Glyph='+', Color=Black, Size=22}" />
</ContentPage.ToolbarItems>

<!-- Display notes in a list -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Title="Your Notes">
<!-- Add an item to the toolbar -->
<ContentPage.ToolbarItems>
<ToolbarItem Text="Add" Clicked="Add_Clicked" IconImageSource="{FontImage Glyph='+', Color=Black, Size=22}" />
<ToolbarItem Text="Add" Clicked="Add_Clicked" IconImageSource="{FontImageSource Glyph='+', Color=Black, Size=22}" />
</ContentPage.ToolbarItems>

<!-- Display notes in a list -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<!-- Add an item to the toolbar -->
<ContentPage.ToolbarItems>
<ToolbarItem Text="Add" Command="{Binding NewCommand}" IconImageSource="{FontImage Glyph='+', Color=Black, Size=22}" />
<ToolbarItem Text="Add" Command="{Binding NewCommand}" IconImageSource="{FontImageSource Glyph='+', Color=Black, Size=22}" />
</ContentPage.ToolbarItems>

<!-- Display notes in a list -->
Expand Down
3 changes: 3 additions & 0 deletions docs/user-interface/controls/image.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ Image image = new Image

The [`FontImage`](xref:Microsoft.Maui.Controls.Xaml.FontImageExtension) markup extension enables you to display a font icon in any view that can display an <xref:Microsoft.Maui.Controls.ImageSource>. It provides the same functionality as the <xref:Microsoft.Maui.Controls.FontImageSource> class, but with a more concise representation.

> [!NOTE]
> The `FontImage` markup extension is deprecated in .NET 10 and will be removed in a future release. Use <xref:Microsoft.Maui.Controls.FontImageSource> instead.

The [`FontImage`](xref:Microsoft.Maui.Controls.Xaml.FontImageExtension) markup extension is supported by the <xref:Microsoft.Maui.Controls.Xaml.FontImageExtension> class, which defines the following properties:

- `FontFamily` of type `string`, the font family to which the font icon belongs.
Expand Down
4 changes: 4 additions & 0 deletions docs/user-interface/fonts.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,8 @@ The following screenshot shows several font icons being displayed:

:::image type="content" source="media/fonts/font-image-source.png" alt-text="Screenshot of three font icons.":::

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

Alternatively, you can display a font icon with the [`FontImage`](xref:Microsoft.Maui.Controls.Xaml.FontImageExtension) markup extension. For more information, see [Load a font icon](~/user-interface/controls/image.md#load-a-font-icon).

::: moniker-end
2 changes: 1 addition & 1 deletion docs/xaml/markup-extensions/consume.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ In addition to the markup extensions discussed in this article, the following ma
- [`AppThemeBinding`](xref:Microsoft.Maui.Controls.Xaml.AppThemeBindingExtension) - specifies a resource to be consumed based on the current system theme. For more information, see [AppThemeBinding markup extension](~/user-interface/system-theme-changes.md#appthemebinding-markup-extension).
- [`Binding`](xref:Microsoft.Maui.Controls.Xaml.BindingExtension) - establishes a link between properties of two objects. For more information, see [Data binding](~/fundamentals/data-binding/index.md).
- [`DynamicResource`](xref:Microsoft.Maui.Controls.Xaml.DynamicResourceExtension) - responds to changes in objects in a resource dictionary. For more information, see [Dynamic styles](~/user-interface/styles/xaml.md#dynamic-styles).
- [`FontImage`](xref:Microsoft.Maui.Controls.Xaml.FontImageExtension) - displays a font icon in any view that can display an <xref:Microsoft.Maui.Controls.ImageSource>. For more information, see [Load a font icon](~/user-interface/controls/image.md#load-a-font-icon).
- [`FontImage`](xref:Microsoft.Maui.Controls.Xaml.FontImageExtension) - displays a font icon in any view that can display an <xref:Microsoft.Maui.Controls.ImageSource>. This markup extension is deprecated in .NET 10. For more information, see [Load a font icon](~/user-interface/controls/image.md#load-a-font-icon).
- [`OnIdiom`](xref:Microsoft.Maui.Controls.Xaml.OnIdiomExtension) - customizes UI appearance based on the idiom of the device the application is running on. For more information, see [Customize UI appearance based on the device idiom](~/platform-integration/customize-ui-appearance.md#customize-ui-appearance-based-on-the-device-idiom).
- [`OnPlatform`](xref:Microsoft.Maui.Controls.Xaml.OnPlatformExtension) - customizes UI appearance on a per-platform basis. For more information, see [Customize UI appearance based on the platform](~/platform-integration/customize-ui-appearance.md#customize-ui-appearance-based-on-the-platform).
- [`RelativeSource`](xref:Microsoft.Maui.Controls.Xaml.RelativeSourceExtension) - sets the binding source relative to the position of the binding target. For more information, see [Relative bindings](~/fundamentals/data-binding/relative-bindings.md).
Expand Down