Skip to content

Commit 1172126

Browse files
authored
MAUI screenshot SetBeforeScreenshotCapture(#11672)
* MAUI - Add documentation for SetBeforeScreenshotCapture option * maui - screenshots | adding more details to `SetBeforeScreenshotCapture`
1 parent c5bf112 commit 1172126

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

platform-includes/enriching-events/attach-screenshots/dotnet.maui.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,16 @@ var builder = MauiApp.CreateBuilder()
55
{
66
options.Dsn = "___PUBLIC_DSN___";
77
options.AttachScreenshot = true;
8+
9+
// Set a Before Screenshot capture callback to execute some code before the screenshot is taken
10+
// This option is optional. if not set, the screenshots will be captured and sent.
11+
options.SetBeforeScreenshotCapture((@event, hint) =>
12+
{
13+
//
14+
// Your code here
15+
16+
// Return true to capture or false to prevent the capture
17+
return true;
18+
});
819
})
920
```

0 commit comments

Comments
 (0)