Plugin.Maui.Accessibility
1.0.0
dotnet add package Plugin.Maui.Accessibility --version 1.0.0
NuGet\Install-Package Plugin.Maui.Accessibility -Version 1.0.0
<PackageReference Include="Plugin.Maui.Accessibility" Version="1.0.0" />
paket add Plugin.Maui.Accessibility --version 1.0.0
#r "nuget: Plugin.Maui.Accessibility, 1.0.0"
// Install Plugin.Maui.Accessibility as a Cake Addin #addin nuget:?package=Plugin.Maui.Accessibility&version=1.0.0 // Install Plugin.Maui.Accessibility as a Cake Tool #tool nuget:?package=Plugin.Maui.Accessibility&version=1.0.0
Plugin.Maui.Accessibility
Plugin.Maui.Accessibility
lets you access system/device accessibility settings in your .NET MAUI application.
Install Plugin
Available on NuGet.
Install with the dotnet CLI: dotnet add package Plugin.Maui.Accessibility
, or through the NuGet Package Manager in Visual Studio.
Supported Platforms
Platform | Minimum Version Supported |
---|---|
iOS | 14+ |
macOS | 14.0+ |
Android | 5.0 (API 21) |
Windows | 11 and 10 version 1809+ |
API Usage
Plugin.Maui.Accessibility
provides the AccessibilityInfo
class that has a single property Property
that you can get or set.
You can either use it as a static class, e.g.: AccessibilityInfo.Default.UseReducedMotion
or with dependency injection: builder.Services.AddSingleton<IAccessibilityInfo>(AccessibilityInfo.Default);
Permissions
Before you can start using Feature, you will need to request the proper permissions on each platform.
iOS
No permissions are needed for iOS.
Android
No permissions are needed for this plugin.
Dependency Injection
You will first need to register the AccessibilityInfo
class with the MauiAppBuilder
following the same pattern that the .NET MAUI Essentials libraries follow.
builder.Services.AddSingleton(AccessibilityInfo.Default);
You can then enable your classes to depend on IAccessibilityInfo
as per the following example.
public class FeatureViewModel
{
readonly IAccessibilityInfo accessibility;
public FeatureViewModel(IAccessibilityInfo a11yInfo)
{
this.accessibility = a11yInfo;
}
public void ShowCompletedMessage()
{
if (accessibility.UseReducedMotion)
{
CompletionAnimation.GoToState(State.Finished);
}
else
{
CompletionAnimation.Start();
}
}
}
Straight usage
Alternatively if you want to skip using the dependency injection approach you can use the Feature.Default
property.
public class FeatureViewModel
{
public void ShowCompletedMessage()
{
if (AccessibilityInfo.Default.UseReducedMotion)
{
CompletionAnimation.GoToState(State.Finished);
}
else
{
CompletionAnimation.Start();
}
}
}
IAccessibilityInfo
Once you have created a AccessibilityInfo
you can interact with it in the following ways:
Events
None.
Properties
UseReducedMotion
Gets a value indicating whether the device is configured to use reduced motion or animations have been disabled.
TextScaleFactor
Gets a double value indicating by what about text should be scaled to match device settings. (Default = 1.0)
Methods
None.
Acknowledgements
This project could not have came to be without these projects and people, thank you! ❤️
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-android35.0 is compatible. net9.0-browser was computed. net9.0-ios was computed. net9.0-ios18.0 is compatible. net9.0-maccatalyst was computed. net9.0-maccatalyst18.0 is compatible. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net9.0-windows10.0.19041 is compatible. |
-
net9.0
- Microsoft.Maui.Controls (>= 9.0.14)
-
net9.0-android35.0
- Microsoft.Maui.Controls (>= 9.0.14)
-
net9.0-ios18.0
- Microsoft.Maui.Controls (>= 9.0.14)
-
net9.0-maccatalyst18.0
- Microsoft.Maui.Controls (>= 9.0.14)
-
net9.0-windows10.0.19041
- Microsoft.Maui.Controls (>= 9.0.14)
- System.Management (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 66 | 2/14/2025 |