Skip to content

MindFusionComponents/wpf-keyboard-samples

Repository files navigation

WPF Virtual Keyboard Samples (wpf-keyboard-samples)

A comprehensive collection of C# WPF (Windows Presentation Foundation) sample applications demonstrating the customizable layouts, styling, touch-screen interactions, and developer APIs of the MindFusion.Keyboard for WPF control.

Touch-Screen On-Screen Input: MindFusion.Keyboard provides WPF applications with a highly programmable virtual keyboard component. It is designed for touch-screen monitors, medical equipment, industrial kiosks, point-of-sale (POS) systems, and embedded Windows systems where physical keyboards are unavailable.

All sample projects in this repository are pre-configured to reference the official MindFusion.Keyboard.Wpf NuGet package directly rather than referencing local files. This enables automatic package restore and seamless out-of-the-box building under both .NET Framework 4.8 and modern .NET 8.0+.


🚀 Key Features

  • Custom Layouts & Keys: Create any keyboard layout with a custom number of keys, labels, special symbols, and custom actions.
  • Touch & Kiosk Friendly: Fully optimized for high-performance touch inputs and kiosk interaction styles.
  • Color Themes & Styles: Support for 10 built-in color themes, standard styles, fully custom control templates, and image-based key graphics.
  • Automatic Focus Popups: Automatically trigger the on-screen keyboard as a popup when input controls (like text boxes) receive focus.
  • Standalone Emulation: Use the control as a standalone floating OS keyboard that sends keystrokes to any active external application window on the system.
  • Layout Rings: Group multiple layouts together to let users cycle through them sequentially (e.g. switching between languages or numeric modes) with a single key.

📂 Samples Demonstrated

This repository includes 8 specialized virtual keyboard sample projects:

  • 🩺 MedicalKeyboard — A custom medical-themed keyboard illustrating custom key layout loading and unique styling for special keys using WPF Data Triggers on the VirtualKey property.
  • ⚙️ Common API — Shows developer API features, such as sending programmatic key strokes from code, auto-filling keyboard layouts, and automatically releasing modifier keys (Shift, Ctrl, Alt).
  • 🔄 Layout Ring — Demonstrates how to configure a layout ring, which allows a specialized LayoutRingKey on the keyboard to cycle through a list of custom layouts (showing the next layout's image or text label).
  • ⌨️ Layouts — Explores the standard, extended, and fully custom layouts. Shows how to define a keyboard with any number of keys and layout structures.
  • 🔢 Numpad View — Dynamically switches the layout to render just a clean, compact numeric pad when focus is on numerical-only input fields, reverting to the full keyboard for standard text fields.
  • 🎯 Popup Keyboard — Shows how to display the virtual keyboard automatically inside a popup window when the application starts or when specific text areas are focused.
  • 🖥️ Standalone Keyboard — Demonstrates utilizing the control as a background standalone OS-level keyboard, sending keystrokes directly to whatever external document or application currently has system focus.
  • 🎨 Styles — Showcases the 10 built-in predefined color themes, default styling, advanced custom styling, and a layout where keys are represented entirely by custom images.

⚙️ Getting Started

Prerequisites

  • IDE: Visual Studio 2022, 2026 or newer.
  • Framework: .NET Framework 4.8 or .NET 8.0+ SDK/Runtime.
  • Package Manager: NuGet (integrated natively into Visual Studio).

How to Build & Run

  1. Clone the Repository:
    git clone https://github.com/MindFusionComponents/wpf-keyboard-samples.git
    cd wpf-keyboard-samples
  2. Open a Sample:
    • Navigate to any sample folder (e.g., MedicalKeyboard, NumpadView, or PopupKeyboard).
    • Double-click the .sln or .csproj file to open it in Visual Studio.
  3. Restore NuGet Packages:
    • When you build or debug the project, Visual Studio will automatically restore the missing MindFusion.Keyboard.Wpf package and its dependencies.
  4. Run:
    • Press F5 or click Start in Visual Studio to compile and run the sample!

📄 License and Product Info

About

A collection of C# WPF Virtual Keyboard samples demonstrating custom touch layouts, on-screen numpad views, layout rings, auto-focus popups, standalone keyboard emulation, and extensive key styling using the MindFusion.Keyboard.Wpf NuGet package. Perfect for kiosk, medical, and embedded touch-screen applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages