Read-Only Customization
This feature lets developers customize the look of the card number input control when it is in read-only mode, including border, fill, and placeholder colors tailored for non‑editable content.
Overview
Property Details
Property
Description
Default Value / Notes
Code Examples
Example 1: Enabling Read-Only Mode with Custom Colors
// Create an instance of the SiticoneCardNumberBox control
SiticoneCardNumberBox cardNumberBox = new SiticoneCardNumberBox();
// Set the control to read-only mode
cardNumberBox.IsReadOnly = true;
// Customize the read-only border colors
cardNumberBox.ReadOnlyBorderColor1 = Color.LightGray;
cardNumberBox.ReadOnlyBorderColor2 = Color.LightGray;
// Customize the read-only fill colors
cardNumberBox.ReadOnlyFillColor1 = Color.WhiteSmoke;
cardNumberBox.ReadOnlyFillColor2 = Color.WhiteSmoke;
// Customize the read-only placeholder color
cardNumberBox.ReadOnlyPlaceholderColor = Color.DarkGray;
// Add the control to the form
this.Controls.Add(cardNumberBox);
cardNumberBox.Location = new Point(20, 20);
cardNumberBox.Size = new Size(300, 50);Example 2: Dynamically Toggling Read-Only State
Key Points
Topic
Description
Best Practices
Best Practice
Explanation
Common Pitfalls
Pitfall
How to Avoid It
Usage Scenarios
Scenario
Description
Real Life Usage Scenarios
Scenario
Example
Troubleshooting Tips
Issue
Potential Cause
Recommended Action
Review
Aspect
Review Notes
Summary
Additional Integration Example
Last updated