Skip to content

946336: Publish UG documentation for 2025 Volume 1 release for SfPdfViewer #3127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: development
Choose a base branch
from

Conversation

YaminiSF4802
Copy link
Contributor

Description :
UG documentation has been added for the Customize the color for the form field in the .NET MAUI PDF Viewer.

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: customizecolor

@SyncfusionBuild
Copy link
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: customizecolor
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
FT Layout Syntax Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

@Syncfusion-CI
Copy link

Build Status: INQUEUE 🕒
Build Location: customizecolor

@Syncfusion-CI
Copy link

The running CI Job is terminated due to changes committed on the source branch for this Merge Request and CI triggered for latest commit.

@Syncfusion-CI
Copy link

CI Status: ABORTED ❌
Source Compilation: Not Started ❌
Build Location: customizecolor

@Syncfusion-CI
Copy link

Build Status: INQUEUE 🕒
Build Location: customizecolor

@Syncfusion-CI
Copy link

Build Status: INPROGRESS 🔃
Build Location: customizecolor

@SyncfusionBuild
Copy link
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: customizecolor
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
FT Layout Syntax Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

@@ -251,6 +251,218 @@ private void PdfViewer_FormFieldValueChanged(object sender, FormFieldValueChange
{% endhighlight %}
{% endtabs %}

### To access the associated form field using the Field property of the Widget class, which is used to get the form field name.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not looks like a heading but used header ###. Can you correct this?

image

{% endhighlight %}
{% endtabs %}

### PropertyChanged Event for Form field
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be a separate topic instead of bringing inside customizing form fields, as it is common for all functions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

completed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still it is used with H3 ###. How it was moved outside? Why it was provided as completed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

completed

@@ -251,6 +251,133 @@ private void PdfViewer_FormFieldValueChanged(object sender, FormFieldValueChange
{% endhighlight %}
{% endtabs %}

## Customize the form fields programmatically

Customizing form fields is crucial for controlling their appearance and behavior. By modifying properties like BackgroundColor, BorderColor, BorderWidth, and ForegroundColor, you can tailor how each form field (such as TextFormField, CheckboxFormField, RadioButtonFormField, etc.) looks within the PDF viewer. Like other form fields properties, you can undo and redo the hiding or showing actions. Additionally, when an form field is locked, it cannot be hidden. Form fields that are hidden will remain hidden during import, export, printing and saving.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general contexts, frame the content in standard English rather than using API terminology, unless you are specifically referring to an API.

image

https://syncfusion.sharepoint.com/sites/Mobile-PDF-Viewer/SitePages/Checklist-for-UG-documentation.aspx

@@ -251,6 +251,133 @@ private void PdfViewer_FormFieldValueChanged(object sender, FormFieldValueChange
{% endhighlight %}
{% endtabs %}

## Customize the form fields programmatically

Customizing form fields is crucial for controlling their appearance and behavior. By modifying properties like BackgroundColor, BorderColor, BorderWidth, and ForegroundColor, you can tailor how each form field (such as TextFormField, CheckboxFormField, RadioButtonFormField, etc.) looks within the PDF viewer. Like other form fields properties, you can undo and redo the hiding or showing actions. Additionally, when an form field is locked, it cannot be hidden. Form fields that are hidden will remain hidden during import, export, printing and saving.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Mention the control name as “PDF Viewer” always (In exact casing).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

completed

@@ -251,6 +251,133 @@ private void PdfViewer_FormFieldValueChanged(object sender, FormFieldValueChange
{% endhighlight %}
{% endtabs %}

## Customize the form fields programmatically

Customizing form fields is crucial for controlling their appearance and behavior. By modifying properties like BackgroundColor, BorderColor, BorderWidth, and ForegroundColor, you can tailor how each form field (such as TextFormField, CheckboxFormField, RadioButtonFormField, etc.) looks within the PDF viewer. Like other form fields properties, you can undo and redo the hiding or showing actions. Additionally, when an form field is locked, it cannot be hidden. Form fields that are hidden will remain hidden during import, export, printing and saving.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you explaining about hide and show feature here?
image


### Customize the backgroundcolor of the form fields

The BackgroundColor property sets the color of the background within a form field. This allows you to customize the background color, which can be useful for creating forms with specific branding or visual styles in a PDF document. The following code explains how to enable the BackgroundColor for text form fields. Similarly, you can do the same for other form fields like checkboxes, radio buttons, and other form fields by modifying their respective properties. The following example illustrates how to add a background color for a TextFormField by accessing the text form field’s `BackgroundColor` property.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Do we have support for creating forms?

{% highlight C# %}
foreach (FormField formField in PdfViewer.FormFields)
{
// Check if the current form field is a TextFormField (text input box)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general contexts, frame the content in standard English rather than using API terminology, unless you are specifically referring to an API.

image

// Wire the propertychanged event of the form field
pdfViewer.PropertyChanged += PdfViewer_PropertyChanged;
}
private void PdfViewer_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this property changed handling is correct? What is the use case you have handled here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes completed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When explaining property changed events (or any other events), the event arguments needs to be used in the code snippets. refer example below.

image

https://help.syncfusion.com/maui/pdf-viewer/migration

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the need for using this for each?

image

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: customizecolor

@SyncfusionBuild
Copy link
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: customizecolor
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
FT Layout Syntax Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

@Syncfusion-CI
Copy link

Build Status: INPROGRESS 🔃
Build Location: customizecolor

@Syncfusion-CI
Copy link

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: customizecolor
Technical Error(s): 0
Spelling Error(s): 0
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
FT Layout Syntax Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: customizecolor

@SyncfusionBuild
Copy link
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: customizecolor
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
FT Layout Syntax Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

@@ -251,6 +251,140 @@ private void PdfViewer_FormFieldValueChanged(object sender, FormFieldValueChange
{% endhighlight %}
{% endtabs %}

## Customize the form fields programmatically

Customizing form fields is crucial for controlling their appearance and behavior. By modifying properties like background color, border color, border width, and foreground color, you can tailor how each form field (such as text form field, checkbox form field, radio button form field, etc.) looks within the PDF Viewer. Like other form field properties, you can undo and redo the customization of the color of the form fields. Additionally, when a form field is locked, its color cannot be modified. The customized color of form fields will be preserved during import, export, printing, and saving, ensuring the color customization remains intact across different document operations.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Did you ensured undo/redo are working properly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@@ -251,6 +251,140 @@ private void PdfViewer_FormFieldValueChanged(object sender, FormFieldValueChange
{% endhighlight %}
{% endtabs %}

## Customize the form fields programmatically

Customizing form fields is crucial for controlling their appearance and behavior. By modifying properties like background color, border color, border width, and foreground color, you can tailor how each form field (such as text form field, checkbox form field, radio button form field, etc.) looks within the PDF Viewer. Like other form field properties, you can undo and redo the customization of the color of the form fields. Additionally, when a form field is locked, its color cannot be modified. The customized color of form fields will be preserved during import, export, printing, and saving, ensuring the color customization remains intact across different document operations.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only color is explained. Can you provide a common term or mention everything?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mentioned everthing


Customizing form fields is crucial for controlling their appearance and behavior. By modifying properties like background color, border color, border width, and foreground color, you can tailor how each form field (such as text form field, checkbox form field, radio button form field, etc.) looks within the PDF Viewer. Like other form field properties, you can undo and redo the customization of the color of the form fields. Additionally, when a form field is locked, its color cannot be modified. The customized color of form fields will be preserved during import, export, printing, and saving, ensuring the color customization remains intact across different document operations.

### Customize the color to the background of the form fields
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

This is grammatically wrong. Have you ensured grammar check properly for all your contents?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

foreach (var widget in textBoxField.Widgets)
{
// Set the foreground color of each widget to Aquamarine
widget. ForegroundColor = Colors.Aquamarine;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the content you have used Red as an example. Can you do the same in example?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to red

{% endhighlight %}
{% endtabs %}

### PropertyChanged Event for Form field
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still it is used with H3 ###. How it was moved outside? Why it was provided as completed?

{% endhighlight %}
{% endtabs %}

### PropertyChanged Event for Form field
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still in the general context, API terminology is used.
image


### PropertyChanged Event for Form field

The PropertyChanged event occurs when a property is changed in the PDF document. It is common for properties such as border color, background color, border width, and foreground color to trigger this event as well. The following example explains how to wire and handle the event.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still API is not used inside backticks ``
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

completed

// Wire the propertychanged event of the form field
pdfViewer.PropertyChanged += PdfViewer_PropertyChanged;
}
private void PdfViewer_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When explaining property changed events (or any other events), the event arguments needs to be used in the code snippets. refer example below.

image

https://help.syncfusion.com/maui/pdf-viewer/migration

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: customizecolor

@SyncfusionBuild
Copy link
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: customizecolor
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
FT Layout Syntax Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

@@ -251,6 +251,141 @@ private void PdfViewer_FormFieldValueChanged(object sender, FormFieldValueChange
{% endhighlight %}
{% endtabs %}

## Customize the form fields programmatically

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still in one of the places only the color is mentioned
image

It is better to have a common term instead of mentioning every time all the fields
image

{% tabs %}
{% highlight C# %}
foreach (FormField formField in PdfViewer.FormFields)
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still the same contradiction occurs
image

// Wire the propertychanged event of the form field
pdfViewer.PropertyChanged += PdfViewer_PropertyChanged;
}
private void PdfViewer_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the need for using this for each?

image

@@ -251,6 +251,141 @@ private void PdfViewer_FormFieldValueChanged(object sender, FormFieldValueChange
{% endhighlight %}
Copy link
Collaborator

@Deepak1799 Deepak1799 Mar 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YaminiSF4802 YaminiSF4802 changed the title Customizecolor 946336: Publish UG documentation for 2025 Volume 1 release for SfPdfViewer Mar 21, 2025
@SyncfusionBuild
Copy link
Contributor

Build Status: INQUEUE 🕒
Build Location: customizecolor


### Customize the background color of the form fields

The `BackgroundColor` property sets the color of the background within a form field. This allows you to customize the background color, which can be useful for changing the forms with specific branding or visual styles in a PDF document. The following code explains how to enable the background color for text form fields. Similarly, you can do the same for other form fields like checkboxes, radio buttons, and other form fields by modifying their respective properties. The following example illustrates how to add a background color for a text form field by accessing the text form field’s `BackgroundColor` property.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the AI for simplify all the other contents also?

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: customizecolor

@SyncfusionBuild
Copy link
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: customizecolor
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
FT Layout Syntax Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants