TabTip.Avalonia 0.3.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package TabTip.Avalonia --version 0.3.1
                    
NuGet\Install-Package TabTip.Avalonia -Version 0.3.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TabTip.Avalonia" Version="0.3.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TabTip.Avalonia" Version="0.3.1" />
                    
Directory.Packages.props
<PackageReference Include="TabTip.Avalonia" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TabTip.Avalonia --version 0.3.1
                    
#r "nuget: TabTip.Avalonia, 0.3.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TabTip.Avalonia@0.3.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TabTip.Avalonia&version=0.3.1
                    
Install as a Cake Addin
#tool nuget:?package=TabTip.Avalonia&version=0.3.1
                    
Install as a Cake Tool

<p align="center"> <img src="icon.png" width="25%" style="max-width: 150px;" /> </p>

Tabtip.Avalonia (Tablet Text Input Panel)

NuGet Version

Avalonia-based and cross-platform re-imagining of WPFTabTip

Currently, the Software Keyboard is only supported on Windows and the default TabTipIntegration triggers based only on the PointerType that is used when clicking a TextBox. This is all configurable. In the future, I'm looking to add some functionality to allow detecting whether a hardware keyboard is connected so that we can forgo triggering the software keyboard if the hardware keyboard is connected.

Usage

The easiest way to use this library is to install the NuGet package and then add the following to App.xaml.cs:

// At the top of your  file
using TabTip.Avalonia;

public override void OnFrameworkInitializationCompleted()
{
    // ...

    // Integrate the tabtip manager into the entire app.
    TabTipManager.Integrate();

    // ...
}

Software Keyboard Trigger

By default, the software keyboard is only opened if the PointerType used when clicking is either PointerType.Touch or PointerType.Pen. If you would like to use any other setting, provide an array of PointerTypes that you want to trigger the software keyboard as below:

// Trigger on all pointer types.
TabTipManager.OverrideIntegrationTrigger([PointerType.Touch, PointerType.Mouse, PointerType.Pen]);

TabTip Factory

The ITabTipFactory interface allows you to provide your own implementation of the ITabTip interface, giving you the flexibility to create it based on which OS the host is running on. The current default is DefaultTabTipFactory which creates a TabTip instance for Windows or, if not running on Windows, simply creates a NullTabTip instance, which has an empty Toggle method so that we don't do anything on other OSs.

Overriding TabTip Factory

To override the default factory, provide an implementation of ITabTipFactory to TabTipManager.OverrideTabTipFactory as follows:

TabTipManager.OverrideTabTipFactory(myCustomFactory);

This will change the factory used and set the TabTip used by the manager to the one returned by myCustomFactory.

TabTip

The TabTip is the platform-specific implementation of the ITabTip interface. It is responsible for opening and closing the software keyboard. We currently have only two built-in implementations:

  • NullTabTip: Does nothing.
  • WindowsTabTip: Contains logic to open the Software Keyboard on Windows.

Overriding TabTip

The recommended way to override the TabTip used it to override the ITabTipFactory as described above.

TabTip Integration

The ITabTipIntegration interface defines the methods used to integrate the TabTip into the application. The implementing class is responsible for when to trigger the TabTip as well as setting up the appropriate event handlers to know when a TextBox has been clicked.

Overriding TabTip Integration

Before fully replacing the default integration, it is recommended to override the TabTipIntegration class. The Integrate method is purposefully virtual so that it can be overridden. Simply create a new class that inherits from TabTipIntegration and override the Integrate method. If you specifically call base.Integrate() in your override, it will call the default implementation of Integrate which will set up the default event handlers while allowing you to add any new ones you want. This is useful if all you want to do is integrate controls other than TextBox.

Regardless of whether you create a brand new class that implements ITabTipIntegration or extends TabTipIntegration, you need to set it as the one that is used by calling:

TabTipManager.OverrideIntegration(myCustomIntegration);

OS Support

OS Supported Notes
Windows
Mac ❌⚠️ Macs don't currently have touchscreens so... I don't see the benefit of adding support. Let me know if you disagree!
Linux I might look into adding support in future versions but I suspect this will require distro-specific handling.
Android ❌⚠️ I have not added specific support for this library as I THINK Avalonia already supports Android properly.
iOs/iPadOS ❌⚠️ I have not added specific support for this library as I THINK Avalonia already supports Android properly.

Why the name TabTip?

"TabTip" refers to the Touch Keyboard and Handwriting Panel, also known as the Tablet Text Input Panel, which is a virtual keyboard in Windows. Since this project was heavily inspired by the WPF version, the name is also inspired by the WPF version.

Roadmap (non-binding 🙃)

  1. Make it possible to detect if a Hardware Keyboard is connected.
  2. Add a method like Integrate which allows us to specify a specific control so that it integrates it and all its children only.
    • ex: Integrate(MyCustomControlReference) would trigger for that control and all its children, but not any other controls in the app.
  3. Add an AttachedProperty or something that will integrate the control it's attached to. Not sure if this is an attached property or not but basically, the same way ToolTip works.
  4. Add code to add the relevant interfaces/classes to DI using Microsoft.Extensions.DependencyInjection
  5. Add support for Linux?
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.0 153 8/17/2025
0.3.1 156 7/13/2025
0.1.0 140 7/13/2025