A lightweight WPF desktop tool for generating repeated text from named numeric variables, with live preview, configurable increments, number padding, clipboard support, and text-file export.
Incremental Text Generator is a Windows desktop utility built with C# and WPF (net10.0-windows). It allows developers, QA engineers, and system administrators to write a single or multi-line text template containing named placeholders such as {{item}} or {{value}}, configure each variable's starting number, step increment, and zero-padding width, and immediately preview and export up to 10,000 generated lines.
| Main Application Window | Animated Live Preview |
|---|---|
![]() |
![]() |
- Named Numeric Variables: Define readable, self-documenting placeholders using
{{variableName}}syntax instead of cryptic single-character symbols. - Automatic Variable Detection: Variables are automatically extracted in the exact order of their first appearance in the template. Duplicate placeholders within the template share a single configuration row and evaluate to the same value on each line.
- 64-Bit Integer Arithmetic (
long): Supports positive, zero, and negativeStartandStepvalues with checked overflow detection. - Sign-Preserving Zero Padding: Pad numbers up to 12 digits (
0–12) while keeping negative signs in front of the padded digits (for example,-002,-001,000,001). - Debounced Asynchronous Live Preview: Automatically recalculates output ~180 ms after edits on a background thread so the UI remains responsive even at 10,000 lines.
- Explicit Export Actions: Copy generated text to the Windows clipboard on demand (
Copy All) or export to a UTF-8.txtfile (Save as Text). Never overwrites the user's clipboard automatically. - One-Click Reset: Instantly restore the default template, line count, and variable settings.
Placeholders use double curly braces:
{{variableName}}
Variable names are case-sensitive and must match the regular expression:
[A-Za-z_][A-Za-z0-9_]*| Valid Examples | Invalid Examples | Reason |
|---|---|---|
{{index}} |
{{123}} |
Cannot start with a digit |
{{item_number}} |
{{item-name}} |
Hyphens are not allowed |
{{Value2}} |
{{ }} / {{}} |
Variable name cannot be empty |
{{_offset}} |
{{unclosed |
Missing closing }} |
Item {{item}} = Value {{value}}
item: Start = 1, Step = 1, Padding = 2
value: Start = 100, Step = 10, Padding = 0
Item 01 = Value 100
Item 02 = Value 110
Item 03 = Value 120
Start = -2, Step = 1, Padding = 3
Output:
-002
-001
000
001
- Operating System: Windows 10 or Windows 11 (x64)
- For Running the Published Release: No runtime installation required (self-contained single-file executable)
- For Building from Source: .NET 10.0 SDK (or newer) with Windows Desktop workload
Prebuilt Windows releases are available from the GitHub Releases page.
- Download
IncrementalTextGenerator-v1.0.0-win-x64.zip. - Extract the ZIP file.
- Run
IncrementalTextGenerator.exe.
The published application is self-contained, so a separate .NET installation is not required.
dotnet build IncrementalTextGenerator.slnx --configuration Releasedotnet publish IncrementalTextGenerator.csproj --configuration Release --runtime win-x64 --self-contained true -p:PublishSingleFile=trueThe self-contained standalone executable will be output to:
artifacts/publish/win-x64/IncrementalTextGenerator.exe
- Prebuilt releases target 64-bit Windows (x64) on Windows 10 or Windows 11.
- ARM64 users can build and publish directly from source using
--runtime win-arm64. - Unsigned open-source executables may trigger a Windows SmartScreen prompt on first run ("Windows protected your PC"). Click More info and select Run anyway.
- This binary is not digitally code-signed.
Launch the standalone executable:
.\IncrementalTextGenerator.exedotnet run --project IncrementalTextGenerator.csprojIncrementalTextGenerator/
├─ Models/
│ └─ SequenceVariable.cs
├─ Services/
│ ├─ TemplateParser.cs
│ └─ TextGenerator.cs
├─ ViewModels/
│ └─ MainViewModel.cs
├─ IncrementalTextGenerator.Tests/
│ ├─ IncrementalTextGenerator.Tests.csproj
│ ├─ TemplateParserTests.cs
│ └─ TextGeneratorTests.cs
├─ Properties/
│ └─ PublishProfiles/
│ └─ win-x64.pubxml
├─ assets/
│ ├─ app.ico
│ ├─ screenshot.png
│ └─ preview.gif
├─ App.xaml
├─ App.xaml.cs
├─ MainWindow.xaml
├─ MainWindow.xaml.cs
├─ IncrementalTextGenerator.csproj
├─ IncrementalTextGenerator.slnx
├─ README.md
├─ LICENSE
└─ .gitignore
For every line index i (starting at i = 0), each variable is evaluated as:
- Template Validation: Detects empty templates, unclosed
{{, unmatched}}, single braces, and invalid variable identifiers. - Line Count Validation: Enforces whole numbers between
1and10,000. - Variable Field Validation: Verifies
StartandStepare valid 64-bit integers (long) andPaddingis between0and12. - Overflow Protection: Uses
checked64-bit arithmetic. IfStart + Step * iexceedslong.MaxValueorlong.MinValue, generation stops immediately and reports the exact variable and line number. - Safe Error Recovery: When any input is invalid, the problematic field is highlighted,
Copy AllandSave as Textare disabled, and the last valid preview output is preserved rather than overwritten with corrupted text.
Automated unit tests are located in IncrementalTextGenerator.Tests and cover:
- Single variable parsing
- Multiple variables parsing
- Duplicate variable occurrences in a template
- First-appearance variable ordering and case sensitivity
- Invalid and incomplete variable syntax handling
- Empty and whitespace templates
- Templates without variables
- Positive
Stepsequences - Negative
Stepsequences - Zero
Stepsequences - Positive
Paddingformatting - Negative number
Paddingformatting (preserving the leading-sign) - Multi-variable text generation
- 64-bit numeric overflow detection (
long.MaxValue/long.MinValue) - Maximum line count boundary (
1to10,000) and ViewModel state transitions
Run all tests with:
dotnet test IncrementalTextGenerator.slnx --configuration ReleaseThe WPF application relies exclusively on the .NET Base Class Library (System.*, Microsoft.Win32.SaveFileDialog, and standard WPF controls). No third-party UI toolkits, MVVM frameworks, template engines, or clipboard libraries are bundled at runtime.
- Maximum line count per generation is capped at
10,000lines to guarantee instant UI responsiveness. - Variables perform linear integer arithmetic (
Start + Step * i); arbitrary mathematical expressions, floating-point increments, or conditional branches are intentionally out of scope. - Single curly braces (
{or}) are treated as incomplete variable tokens and flagged by the parser to prevent accidental typos when writing{{variableName}}.
wpf csharp dotnet text-generator template-engine developer-tools desktop-app clipboard windows
This project is licensed under the MIT License.

