---
title: "PDF viewer dark mode | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/maui/user-interface/dark-theme/"
md_url: "https://www.nutrient.io/guides/maui/user-interface/dark-theme.md"
last_updated: "2026-05-30T02:20:01.345Z"
description: "With Nutrient, it’s possible to programmatically change the interface to dark mode by setting the Application.Current!.UserAppTheme property:."
---

# Enabling dark theme in our MAUI PDF viewer

With Nutrient, it’s possible to programmatically change the interface to dark mode by setting the [`Application.Current!.UserAppTheme`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.application.userapptheme?view=net-maui-8.0) property:

```csharp

Application.Current!.UserAppTheme = AppTheme.Dark;
Application.Current!.UserAppTheme = AppTheme.Light;

```

Note that you can only set the theme to `AppTheme.Dark` or `AppTheme.Light` before loading the MAUI SDK. Any theme changes after the SDK is loaded will not be applied.

## Advanced theming

The MAUI SDK uses the Nutrient Web SDK internally for rendering. If you need more granular control over the viewer's appearance beyond the built-in dark and light themes — such as customizing colors, typography, spacing, or applying theme changes to specific UI sections — refer to the [Web SDK theming guide](https://www.nutrient.io/guides/web/user-interface/theming/custom-theme.md).
---

## Related pages

- [User interface customization in our MAUI PDF viewer](/guides/maui/user-interface.md)

