agentsclimarketplace

Syncfusion winforms calculator

Skill syncfusion/winforms-ui-components-skills/skills/syncfusion-winforms-calculator

Skills for Syncfusion WinForms controls. Enable AI-assisted development with comprehensive documentation, code examples, and best practices for 100+ UI controls including DataGrid, Charts, Scheduler, and more.

Install
npx -y skills add syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-calculator

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Implement and configure Syncfusion Windows Forms Calculator control for numeric input and calculation interfaces. Use this when creating calculator UIs, handling calculator events, supporting keyboard input, displaying calculation results, or integrating calculator functionality into Windows Forms applications.

SKILL.md

6.7 KB, as published. Nobody here has run it

Implementing Syncfusion Windows Forms Calculator

The Syncfusion Calculator control is a fully-featured calculator for Windows Forms applications. It supports both standard and financial layouts, keyboard operations, memory functions, and can be embedded as a popup control.

When to Use This Skill

Use the Calculator control when your application needs:

  • Standard or scientific calculator functionality
  • Keyboard and mouse input support
  • Memory operations (MS, MR, M+, MC)
  • Popup calculator attached to input fields
  • Display of calculation results and intermediate values
  • Support for both C# and VB.NET

Component Overview

CalculatorControl β€” The main calculator component with layout modes, keyboard support, and value calculation events

PopupCalculator β€” A wrapper class to display CalculatorControl as a popup attached to buttons or other controls

Key Characteristics

  • Two layout modes: Standard (default) and Financial
  • Full keyboard support with standard calculator shortcuts
  • Memory management (MS, MR, M+, MC operations)
  • Display TextBox with customizable alignment and font
  • Event-driven architecture (ValueCalculated, Closing events)
  • Culture-aware value formatting
  • Lightweight, embeddable component

Documentation and Navigation Guide

Getting Started

πŸ“„ Read: references/getting-started.md

  • Assembly dependencies and NuGet installation
  • Create Windows Forms project with Calculator
  • Add control via Designer or manual code
  • Required namespaces and basic instantiation

Layout and Appearance

πŸ“„ Read: references/layout-and-appearance.md

  • Standard vs Financial layout modes
  • Background color and images
  • Border styles
  • Button spacing and styling
  • Display text alignment

Display and Value Handling

πŸ“„ Read: references/display-and-value-handling.md

  • Display TextBox properties and visibility
  • Managing numeric values (String vs Double)
  • Culture-specific formatting
  • Font customization

Keyboard and Runtime Features

πŸ“„ Read: references/keyboard-and-runtime-features.md

  • Complete keyboard shortcut reference
  • Memory operations (MS, MR, M+, MC)
  • Numeric operations and calculations
  • Special functions (sqrt, reciprocal, percentage)

Events and Interaction

πŸ“„ Read: references/events-and-interaction.md

  • ValueCalculated event handling
  • Closing event for PopupCalculator
  • LastAction property for determining completed operations
  • Error condition handling

Popup Calculator

πŸ“„ Read: references/popup-calculator.md

  • Creating PopupCalculator instances
  • ParentControl association
  • Popup alignment options
  • Displaying and using popup calculator

Quick Start Example

using Syncfusion.Windows.Forms.Tools;
using System.Windows.Forms;

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
        
        // Create Calculator control
        CalculatorControl calculatorControl = new CalculatorControl();
        calculatorControl.Size = new System.Drawing.Size(300, 250);
        calculatorControl.LayoutType = CalculatorLayoutTypes.WindowsStandard;
        
        // Add to form
        this.Controls.Add(calculatorControl);
        
        // Handle value changes
        calculatorControl.ValueCalculated += (sender, args) =>
        {
            if (!args.ErrorCondition && args.LastAction == CalcActions.CalcOperatorEquals)
            {
                MessageBox.Show($"Result: {calculatorControl.Value}");
            }
        };
    }
}

Common Patterns

Pattern 1: Standard Calculator with Event Handling

Create a calculator that logs all operations and displays final results when "=" is pressed.

CalculatorControl calc = new CalculatorControl();
calc.ValueCalculated += (sender, args) =>
{
    if (!args.ErrorCondition && args.LastAction == CalcActions.CalcOperatorEquals)
    {
        // Process final value
        double result = calc.DoubleValue;
    }
};

Pattern 2: Popup Calculator on Button Click

Embed calculator as a popup that displays when button is clicked.

PopupCalculator popupCalc = new PopupCalculator();
popupCalc.ParentControl = myButton;
popupCalc.PopupCalculatorAlignment = CalculatorPopupAlignment.Right;
popupCalc.Closing += (sender, args) => 
{
    decimal finalValue = args.FinalValue;
};

Pattern 3: Financial Layout with Custom Styling

Display a financial calculator with custom appearance.

CalculatorControl calc = new CalculatorControl();
calc.LayoutType = CalculatorLayoutTypes.Financial;
calc.DisplayTextAlign = System.Windows.Forms.HorizontalAlignment.Right;
calc.UseVerticalAndHorizontalSpacing = true;
calc.HorizontalSpacing = 5;
calc.VerticalSpacing = 5;

Key Properties

PropertyPurposeNotes
LayoutTypeSwitch between Standard and Financial layoutsDefault is WindowsStandard
ShowDisplayAreaShow/hide the display TextBoxTrue by default
DoubleValueGet/set numeric value as doubleUse for calculations
ValueGet current valueReturns CalculatorValue object
CultureSet culture for number formattingAffects decimal separator
DisplayTextAlignAlign display text (Left/Center/Right)Default is Right
FlatStyleButton appearance (Flat/Popup/Standard)Changes button rendering

Common Use Cases

  1. Financial Calculator β€” Use Financial layout mode with memory operations for accounting applications
  2. Quick Calculation Popup β€” Attach PopupCalculator to TextBox for quick value entry
  3. Multi-Input Form β€” Place calculator on form for users to compute values before entering
  4. Keyboard-Only Input β€” Calculator accessible via keyboard shortcuts in keyboard-driven apps
  5. Value Validation β€” Display calculator result in TextBox after "=" pressed

Next Steps

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.