Skip to content

Commit c3bd1e6

Browse files
947270: Blazor UG Documentation Samples
1 parent 5115441 commit c3bd1e6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Form Designer/Components/Pages/SetMode.razor

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,23 @@
1010
</SfPdfViewer2>
1111

1212
@code {
13+
// Reference to the PDF Viewer instance
1314
private SfPdfViewer2 viewer;
15+
16+
// Path to the PDF document to be loaded in the viewer
1417
private string DocumentPath = "wwwroot/data/formDesigner_Empty.pdf";
1518

19+
// Method to enable form field drawing mode with a specific field type
1620
async Task SetFormDrawingMode()
1721
{
22+
// Sets the form field drawing mode to DropDown, allowing users to add dropdown fields
1823
await viewer.SetFormDrawingModeAsync(FormFieldType.DropDown);
1924
}
2025

26+
// Method to disable form field drawing mode
2127
async Task ClearFormDrawingMode()
2228
{
29+
// Clears the form field drawing mode, preventing further form field additions
2330
await viewer.SetFormDrawingModeAsync();
2431
}
2532
}

0 commit comments

Comments
 (0)