Skip to content

Commit 7fe9e7b

Browse files
authored
Xamarin.Forms bookmark fixes (#1701)
* Removed custom bookmarks. * no-loc key error fixed. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * XAML bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fix. * Bookmark fix. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes. * Bookmark fixes.
1 parent ae0a89c commit 7fe9e7b

File tree

69 files changed

+208
-634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+208
-634
lines changed

docs/get-started/tutorials/image/includes/customize-appearance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
This code sets the [`Aspect`](xref:Xamarin.Forms.Image.Aspect) property, which defines the scaling mode of the image, to [`Fill`](xref:Xamarin.Forms.Aspect.Fill). The `Fill` member is defined in the [`Aspect`](xref:Xamarin.Forms.Aspect) enumeration, and stretches the image to completely fill the view, regardless of whether the image is distorted. For more information about image scaling, see [Displaying images](~/xamarin-forms/user-interface/images.md#display-images) in the [Images in Xamarin.Forms](~/xamarin-forms/user-interface/images.md) guide.
1414

15-
The `OnPlatform` markup extension enables you to customize UI appearance on a per-platform basis. In this example, the markup extension is used to set the [`HeightRequest`](xref:Xamarin.Forms.VisualElement.HeightRequest) and [`WidthRequest`](xref:Xamarin.Forms.VisualElement.WidthRequest) properties to 300 device-independent units on iOS and to 250 device-independent units on Android. For more information about the `OnPlatform` markup extension, see [OnPlatform markup extension](~/xamarin-forms/xaml/markup-extensions/consuming.md#onplatform) in the [Consuming XAML Markup Extensions](~/xamarin-forms/xaml/markup-extensions/consuming.md) guide.
15+
The `OnPlatform` markup extension enables you to customize UI appearance on a per-platform basis. In this example, the markup extension is used to set the [`HeightRequest`](xref:Xamarin.Forms.VisualElement.HeightRequest) and [`WidthRequest`](xref:Xamarin.Forms.VisualElement.WidthRequest) properties to 300 device-independent units on iOS and to 250 device-independent units on Android. For more information about the `OnPlatform` markup extension, see [OnPlatform markup extension](~/xamarin-forms/xaml/markup-extensions/consuming.md#onplatform-markup-extension) in the [Consuming XAML Markup Extensions](~/xamarin-forms/xaml/markup-extensions/consuming.md) guide.
1616

1717
In addition, the [`HorizontalOptions`](xref:Xamarin.Forms.View.HorizontalOptions) property specifies that the image will be horizontally centered.
1818

@@ -34,7 +34,7 @@
3434

3535
This code sets the [`Aspect`](xref:Xamarin.Forms.Image.Aspect) property, which defines the scaling mode of the image, to [`Fill`](xref:Xamarin.Forms.Aspect.Fill). The `Fill` member is defined in the [`Aspect`](xref:Xamarin.Forms.Aspect) enumeration, and stretches the image to completely fill the view, regardless of whether the image is distorted. For more information about image scaling, see [Displaying images](~/xamarin-forms/user-interface/images.md#display-images) in the [Images in Xamarin.Forms](~/xamarin-forms/user-interface/images.md) guide.
3636

37-
The `OnPlatform` markup extension enables you to customize UI appearance on a per-platform basis. In this example, the markup extension is used to set the [`HeightRequest`](xref:Xamarin.Forms.VisualElement.HeightRequest) and [`WidthRequest`](xref:Xamarin.Forms.VisualElement.WidthRequest) properties to 300 on iOS and to 250 on Android. For more information about the `OnPlatform` markup extension, see [OnPlatform markup extension](~/xamarin-forms/xaml/markup-extensions/consuming.md#onplatform) in the [Consuming XAML Markup Extensions](~/xamarin-forms/xaml/markup-extensions/consuming.md) guide.
37+
The `OnPlatform` markup extension enables you to customize UI appearance on a per-platform basis. In this example, the markup extension is used to set the [`HeightRequest`](xref:Xamarin.Forms.VisualElement.HeightRequest) and [`WidthRequest`](xref:Xamarin.Forms.VisualElement.WidthRequest) properties to 300 on iOS and to 250 on Android. For more information about the `OnPlatform` markup extension, see [OnPlatform markup extension](~/xamarin-forms/xaml/markup-extensions/consuming.md#onplatform-markup-extension) in the [Consuming XAML Markup Extensions](~/xamarin-forms/xaml/markup-extensions/consuming.md) guide.
3838

3939
In addition, the [`HorizontalOptions`](xref:Xamarin.Forms.View.HorizontalOptions) property specifies that the image will be horizontally centered.
4040

docs/ios/user-interface/ios-ui/introduction-to-the-appearance-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ progress2.TrackTintColor = UIColor.FromRGB (197,255,132);
8181
## Using UIAppearance in Xamarin.Forms
8282

8383
The Appearance API can be useful when
84-
[styling the iOS app](~/xamarin-forms/platform/ios/formatting.md#uiappearance)
84+
[styling the iOS app](~/xamarin-forms/platform/ios/formatting.md#uiappearance-api)
8585
in Xamarin.Forms solutions. A few lines in the `AppDelegate` class can help
8686
to implement a specific color scheme without having to create a
8787
[custom renderer](~/xamarin-forms/app-fundamentals/custom-renderer/index.md).
@@ -130,4 +130,4 @@ Refer to the [Introduction to the Appearance API](~/ios/user-interface/ios-ui/in
130130

131131
- [Appearance (sample)](https://docs.microsoft.com/samples/xamarin/ios-samples/appearance)
132132
- [UIAppearance Protocol Reference](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIAppearance_Protocol/)
133-
- [Appearance in Xamarin.Forms](~/xamarin-forms/platform/ios/formatting.md#uiappearance)
133+
- [Appearance in Xamarin.Forms](~/xamarin-forms/platform/ios/formatting.md#uiappearance-api)

docs/xamarin-forms/app-fundamentals/accessibility/automation-properties.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ _Xamarin.Forms allows accessibility values to be set on user interface elements
1818

1919
Xamarin.Forms allows automation properties to be set on user interface elements via the following attached properties:
2020

21-
- `AutomationProperties.IsInAccessibleTree` – indicates whether the element is available to an accessible application. For more information, see [AutomationProperties.IsInAccessibleTree](#isinaccessibletree).
22-
- `AutomationProperties.Name` – a short description of the element that serves as a speakable identifier for the element. For more information, see [AutomationProperties.Name](#name).
23-
- `AutomationProperties.HelpText` – a longer description of the element, which can be thought of as tooltip text associated with the element. For more information, see [AutomationProperties.HelpText](#helptext).
24-
- `AutomationProperties.LabeledBy` – allows another element to define accessibility information for the current element. For more information, see [AutomationProperties.LabeledBy](#labeledby).
21+
- `AutomationProperties.IsInAccessibleTree` – indicates whether the element is available to an accessible application. For more information, see [AutomationProperties.IsInAccessibleTree](#automationpropertiesisinaccessibletree).
22+
- `AutomationProperties.Name` – a short description of the element that serves as a speakable identifier for the element. For more information, see [AutomationProperties.Name](#automationpropertiesname).
23+
- `AutomationProperties.HelpText` – a longer description of the element, which can be thought of as tooltip text associated with the element. For more information, see [AutomationProperties.HelpText](#automationpropertieshelptext).
24+
- `AutomationProperties.LabeledBy` – allows another element to define accessibility information for the current element. For more information, see [AutomationProperties.LabeledBy](#automationpropertieslabeledby).
2525

2626
These attached properties set native accessibility values so that a screen reader can speak about the element. For more information about attached properties, see [Attached Properties](~/xamarin-forms/xaml/attached-properties.md).
2727

@@ -44,8 +44,6 @@ Screen readers also read different accessibility values. In the sample applicati
4444

4545
In addition, Narrator will prioritize `AutomationProperties.Name`, `AutomationProperties.LabeledBy`, and then `AutomationProperties.HelpText`. On Android, TalkBack may combine the `AutomationProperties.Name` and `AutomationProperties.HelpText` values. Therefore, it's recommended that thorough accessibility testing is carried out on each platform to ensure an optimal experience.
4646

47-
<a name="isinaccessibletree" />
48-
4947
## AutomationProperties.IsInAccessibleTree
5048

5149
The `AutomationProperties.IsInAccessibleTree` attached property is a `boolean` that determines if the element is accessible, and hence visible, to screen readers. It must be set to `true` to use the other accessibility attached properties. This can be accomplished in XAML as follows:
@@ -64,8 +62,6 @@ AutomationProperties.SetIsInAccessibleTree(entry, true);
6462
> [!NOTE]
6563
> Note that the [`SetValue`](xref:Xamarin.Forms.BindableObject.SetValue(Xamarin.Forms.BindableProperty,System.Object)) method can also be used to set the `AutomationProperties.IsInAccessibleTree` attached property – `entry.SetValue(AutomationProperties.IsInAccessibleTreeProperty, true);`
6664
67-
<a name="name" />
68-
6965
## AutomationProperties.Name
7066

7167
The `AutomationProperties.Name` attached property value should be a short, descriptive text string that a screen reader uses to announce an element. This property should be set for elements that have a meaning that is important for understanding the content or interacting with the user interface. This can be accomplished in XAML as follows:
@@ -86,8 +82,6 @@ AutomationProperties.SetName(activityIndicator, "Progress indicator");
8682
> [!NOTE]
8783
> Note that the [`SetValue`](xref:Xamarin.Forms.BindableObject.SetValue(Xamarin.Forms.BindableProperty,System.Object)) method can also be used to set the `AutomationProperties.Name` attached property – `activityIndicator.SetValue(AutomationProperties.NameProperty, "Progress indicator");`
8884
89-
<a name="helptext" />
90-
9185
## AutomationProperties.HelpText
9286

9387
The `AutomationProperties.HelpText` attached property should be set to text that describes the user interface element, and can be thought of as tooltip text associated with the element. This can be accomplished in XAML as follows:
@@ -111,8 +105,6 @@ AutomationProperties.SetHelpText(button, "Tap to toggle the activity indicator")
111105
112106
On some platforms, for edit controls such as an [`Entry`](xref:Xamarin.Forms.Entry), the `HelpText` property can sometimes be omitted and replaced with placeholder text. For example, "Enter your name here" is a good candidate for the [`Entry.Placeholder`](xref:Xamarin.Forms.InputView.Placeholder) property that places the text in the control prior to the user's actual input.
113107

114-
<a name="labeledby" />
115-
116108
## AutomationProperties.LabeledBy
117109

118110
The `AutomationProperties.LabeledBy` attached property allows another element to define accessibility information for the current element. For example, a [`Label`](xref:Xamarin.Forms.Label) next to an [`Entry`](xref:Xamarin.Forms.Entry) can be used to describe what the `Entry` represents. This can be accomplished in XAML as follows:

docs/xamarin-forms/app-fundamentals/app-lifecycle.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@ no-loc: [Xamarin.Forms, Xamarin.Essentials]
1414

1515
The [`Application`](xref:Xamarin.Forms.Application) base class provides the following features:
1616

17-
- [Lifecycle methods](#Lifecycle_Methods) `OnStart`, `OnSleep`, and `OnResume`.
18-
- [Page navigation events](#page) [`PageAppearing`](xref:Xamarin.Forms.Application.PageAppearing), [`PageDisappearing`](xref:Xamarin.Forms.Application.PageDisappearing).
19-
- [Modal navigation events](#modal) `ModalPushing`, `ModalPushed`, `ModalPopping`, and `ModalPopped`.
20-
21-
<a name="Lifecycle_Methods" />
17+
- [Lifecycle methods](#lifecycle-methods) `OnStart`, `OnSleep`, and `OnResume`.
18+
- [Page navigation events](#page-navigation-events) [`PageAppearing`](xref:Xamarin.Forms.Application.PageAppearing), [`PageDisappearing`](xref:Xamarin.Forms.Application.PageDisappearing).
19+
- [Modal navigation events](#modal-navigation-events) `ModalPushing`, `ModalPushed`, `ModalPopping`, and `ModalPopped`.
2220

2321
## Lifecycle methods
2422

@@ -51,9 +49,7 @@ protected override void OnResume()
5149
> [!IMPORTANT]
5250
> On Android, the `OnStart` method will be called on rotation as well as when the application first starts, if the main activity lacks `ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation` in the `[Activity()]` attribute.
5351
54-
<a name="page" />
55-
56-
## Page notification events
52+
## Page navigation events
5753

5854
There are two events on the [`Application`](xref:Xamarin.Forms.Application) class that provide notification of pages appearing and disappearing:
5955

@@ -65,8 +61,6 @@ These events can be used in scenarios where you want to track pages as they appe
6561
> [!NOTE]
6662
> The [`PageAppearing`](xref:Xamarin.Forms.Application.PageAppearing) and [`PageDisappearing`](xref:Xamarin.Forms.Application.PageDisappearing) events are raised from the [`Page`](xref:Xamarin.Forms.Page) base class immediately after the [`Page.Appearing`](xref:Xamarin.Forms.Page.Appearing) and [`Page.Disappearing`](xref:Xamarin.Forms.Page.Disappearing) events, respectively.
6763
68-
<a name="modal" />
69-
7064
## Modal navigation events
7165

7266
There are four events on the [`Application`](xref:Xamarin.Forms.Application) class, each with their own event arguments, that let you respond to modal pages being shown and dismissed:

docs/xamarin-forms/app-fundamentals/application-class.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ no-loc: [Xamarin.Forms, Xamarin.Essentials]
1616
The `Application` base class offers the following features, which are exposed in your projects default `App` subclass:
1717

1818
* A `MainPage` property, which is where to set the initial page for the app.
19-
* A persistent [`Properties` dictionary](#Properties_Dictionary) to store simple values across lifecycle state changes.
19+
* A persistent [`Properties` dictionary](#properties-dictionary) to store simple values across lifecycle state changes.
2020
* A static `Current` property that contains a reference to the current application object.
2121

2222
It also exposes [Lifecycle methods](~/xamarin-forms/app-fundamentals/app-lifecycle.md) such
@@ -72,8 +72,6 @@ public class App : Xamarin.Forms.Application
7272
}
7373
```
7474

75-
<a name="Properties_Dictionary" />
76-
7775
## Properties dictionary
7876

7977
The `Application` subclass has a static `Properties` dictionary which can be used to store data, in particular for use in the `OnStart`, `OnSleep`, and `OnResume` methods. This can be accessed from anywhere in your Xamarin.Forms code using `Application.Current.Properties`.

docs/xamarin-forms/app-fundamentals/custom-renderer/contentpage.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@ The following diagram illustrates the relationship between the [`ContentPage`](x
2424

2525
The rendering process can be taken advantage of to implement platform-specific customizations by creating a custom renderer for a [`ContentPage`](xref:Xamarin.Forms.ContentPage) on each platform. The process for doing this is as follows:
2626

27-
1. [Create](#Creating_the_Xamarin.Forms_Page) a Xamarin.Forms page.
28-
1. [Consume](#Consuming_the_Xamarin.Forms_Page) the page from Xamarin.Forms.
29-
1. [Create](#Creating_the_Page_Renderer_on_each_Platform) the custom renderer for the page on each platform.
27+
1. [Create](#creating-the-xamarinforms-page) a Xamarin.Forms page.
28+
1. [Consume](#consuming-the-xamarinforms-page) the page from Xamarin.Forms.
29+
1. [Create](#creating-the-page-renderer-on-each-platform) the custom renderer for the page on each platform.
3030

3131
Each item will now be discussed in turn, to implement a `CameraPage` that provides a live camera feed and the ability to capture a photo.
3232

33-
<a name="Creating_the_Xamarin.Forms_Page" />
34-
3533
## Creating the Xamarin.Forms Page
3634

3735
An unaltered [`ContentPage`](xref:Xamarin.Forms.ContentPage) can be added to the shared Xamarin.Forms project, as shown in the following XAML code example:
@@ -71,8 +69,6 @@ public class CameraPageCS : ContentPage
7169

7270
An instance of the `CameraPage` will be used to display the live camera feed on each platform. Customization of the control will be carried out in the custom renderer, so no additional implementation is required in the `CameraPage` class.
7371

74-
<a name="Consuming_the_Xamarin.Forms_Page" />
75-
7672
## Consuming the Xamarin.Forms Page
7773

7874
The empty `CameraPage` must be displayed by the Xamarin.Forms application. This occurs when a button on the `MainPage` instance is tapped, which in turn executes the `OnTakePhotoButtonClicked` method, as shown in the following code example:
@@ -86,8 +82,6 @@ async void OnTakePhotoButtonClicked (object sender, EventArgs e)
8682

8783
This code simply navigates to the `CameraPage`, on which custom renderers will customize the page's appearance on each platform.
8884

89-
<a name="Creating_the_Page_Renderer_on_each_Platform" />
90-
9185
## Creating the Page Renderer on each Platform
9286

9387
The process for creating the custom renderer class is as follows:

docs/xamarin-forms/app-fundamentals/custom-renderer/entry.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,15 @@ The following diagram illustrates the relationship between the [`Entry`](xref:Xa
2424

2525
The rendering process can be taken advantage of to implement platform-specific customizations by creating a custom renderer for the [`Entry`](xref:Xamarin.Forms.Entry) control on each platform. The process for doing this is as follows:
2626

27-
1. [Create](#Creating_the_Custom_Entry_Control) a Xamarin.Forms custom control.
28-
1. [Consume](#Consuming_the_Custom_Control) the custom control from Xamarin.Forms.
29-
1. [Create](#Creating_the_Custom_Renderer_on_each_Platform) the custom renderer for the control on each platform.
27+
1. [Create](#creating-the-custom-entry-control) a Xamarin.Forms custom control.
28+
1. [Consume](#consuming-the-custom-control) the custom control from Xamarin.Forms.
29+
1. [Create](#creating-the-custom-renderer-on-each-platform) the custom renderer for the control on each platform.
3030

3131
Each item will now be discussed in turn, to implement an [`Entry`](xref:Xamarin.Forms.Entry) control that has a different background color on each platform.
3232

3333
> [!IMPORTANT]
3434
> This article explains how to create a simple custom renderer. However, it's not necessary to create a custom renderer to implement an `Entry` that has a different background color on each platform. This can be more easily accomplished by using the [`Device`](xref:Xamarin.Forms.Device) class, or the `OnPlatform` markup extension, to provide platform-specific values. For more information, see [Providing Platform-Specific Values](~/xamarin-forms/platform/device.md#provide-platform-specific-values) and [OnPlatform Markup Extension](~/xamarin-forms/xaml/markup-extensions/consuming.md#onplatform-markup-extension).
3535
36-
<a name="Creating_the_Custom_Entry_Control"></a>
37-
3836
## Creating the Custom Entry Control
3937

4038
A custom [`Entry`](xref:Xamarin.Forms.Entry) control can be created by subclassing the `Entry` control, as shown in the following code example:
@@ -47,8 +45,6 @@ public class MyEntry : Entry
4745

4846
The `MyEntry` control is created in the .NET Standard library project and is simply an [`Entry`](xref:Xamarin.Forms.Entry) control. Customization of the control will be carried out in the custom renderer, so no additional implementation is required in the `MyEntry` control.
4947

50-
<a name="Consuming_the_Custom_Control"></a>
51-
5248
## Consuming the Custom Control
5349

5450
The `MyEntry` control can be referenced in XAML in the .NET Standard library project by declaring a namespace for its location and using the namespace prefix on the control element. The following code example shows how the `MyEntry` control can be consumed by a XAML page:
@@ -92,8 +88,6 @@ This code instantiates a new [`ContentPage`](xref:Xamarin.Forms.ContentPage) obj
9288

9389
A custom renderer can now be added to each application project to customize the control's appearance on each platform.
9490

95-
<a name="Creating_the_Custom_Renderer_on_each_Platform"></a>
96-
9791
## Creating the Custom Renderer on each Platform
9892

9993
The process for creating the custom renderer class is as follows:

0 commit comments

Comments
 (0)