VirtualKeyboard.Wpf.Core 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package VirtualKeyboard.Wpf.Core --version 1.0.0                
NuGet\Install-Package VirtualKeyboard.Wpf.Core -Version 1.0.0                
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="VirtualKeyboard.Wpf.Core" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VirtualKeyboard.Wpf.Core --version 1.0.0                
#r "nuget: VirtualKeyboard.Wpf.Core, 1.0.0"                
#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.
// Install VirtualKeyboard.Wpf.Core as a Cake Addin
#addin nuget:?package=VirtualKeyboard.Wpf.Core&version=1.0.0

// Install VirtualKeyboard.Wpf.Core as a Cake Tool
#tool nuget:?package=VirtualKeyboard.Wpf.Core&version=1.0.0                

VirtualKeyboard.Wpf.Core

look Virtual keyboard for wpf - designed to be used in kiosk-like applications

Setup

Add style file to your main App.xaml resources

<Application.Resources>
	<ResourceDictionary>
		<ResourceDictionary.MergedDictionaries>
			<ResourceDictionary Source="pack://application:,,,/VirtualKeyboard.Wpf.Core;component/ResourceDictionaries/DefaultStyles.xaml"/>
		</ResourceDictionary.MergedDictionaries>
	</ResourceDictionary>
</Application.Resources>

And you're ready to go

Usage

To open keyboard window manually from either code-behind or view model, you just write

var value = await VKeyboard.OpenAsync();

You can also listen for click event on certain UIElement type to automatically open keyboard dialog and assign new value to certain property. Just add (preferably in App.xaml startup event)

VKeyboard.Listen<TextBox>(e => e.Text);

Now every time you click on any TextBox - keyboard dialog will showup with default value of Text property, and will automatically assign new value. ** Hint ** You can combine it with checking for touch devices, so it will only listen when there is an available touch device.

Custom styling

You can create your own style resource file and add it instead of a default one. Additionaly you can specify your own Keyboard host window. Just create a new window with two ** ContentControl **controls - similar to DefaultKeyboardHost:

<Window x:Class="VirtualKeyboard.Wpf.Core.DefaultKeyboardHost"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:VirtualKeyboard.Wpf.Core"
        mc:Ignorable="d"
        WindowState="Maximized" ShowInTaskbar="False" ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True">
    <Window.Background>
        <SolidColorBrush Opacity="0.5" Color="Black"/>
    </Window.Background>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="2*"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <ContentControl MaxWidth="700" MaxHeight="150" x:Name="KeyboardValueContent"/>
        </Grid>
        <Grid Grid.Row="1">
            <ContentControl MaxWidth="900" MaxHeight="360" x:Name="KeyboardContent"/>
        </Grid>
    </Grid>
</Window>

Now just register new host

VKeyboard.Config(typeof(DefaultKeyboardHost));
Product Compatible and additional computed target framework versions.
.NET net5.0-windows7.0 is compatible.  net6.0-windows was computed.  net7.0-windows was computed.  net8.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
1.0.5 533 5/25/2022
1.0.4 254 12/17/2021
1.0.3 246 12/16/2021
1.0.2 243 12/14/2021
1.0.1 219 12/14/2021
1.0.0 249 12/2/2021