diff --git a/platform-includes/enriching-events/attach-screenshots/dotnet.maui.mdx b/platform-includes/enriching-events/attach-screenshots/dotnet.maui.mdx index d9e120946dcf4..df397b70ec26b 100644 --- a/platform-includes/enriching-events/attach-screenshots/dotnet.maui.mdx +++ b/platform-includes/enriching-events/attach-screenshots/dotnet.maui.mdx @@ -5,5 +5,16 @@ var builder = MauiApp.CreateBuilder() { options.Dsn = "___PUBLIC_DSN___"; options.AttachScreenshot = true; + + // Set a Before Screenshot capture callback to execute some code before the screenshot is taken + // This option is optional. if not set, the screenshots will be captured and sent. + options.SetBeforeScreenshotCapture((@event, hint) => + { + // + // Your code here + + // Return true to capture or false to prevent the capture + return true; + }); }) ```