I have been experimenting with the VirtualKeyboard.
When used like this :
<Window ...>
<Grid>
<vk:VirtualKeyboard TemplateLayout="{Binding KeyboardLayout}"
IsStandAlone="False"
AutoFill="True" />
</Grid>
</Window>
All is fine. When I change from English to German to French I see it automatically change between QWERTY, QWERTZ and AZERTY
However, when I try to instantiate the VirtualKeyboard within a data template, AutoFill doesn't work anymore, and as I change between the languages, the keyboard doesn't update between QWERTY, QWERTZ and AZERTY?
Its very strange? not sure why having it in a template would cause this behaviour?
<Window ...>
<Window.Resources>
<DataTemplate DataType="{x:Type local:KeyboardViewModel}">
<vk:VirtualKeyboard TemplateLayout="{Binding KeyboardLayout}"
IsStandAlone="False"
AutoFill="True" />
</DataTemplate>
</Window.Resources>
<Grid>
<ContentPresenter Content="{Binding KeyboardViewModel}" />
</Grid>
</Window>
I am using the MindFusion.Keyboard.Wpf 5.0.3 nuget package in a .net 6 WPF project.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<None Remove="Default.xml" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Default.xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MindFusion.Keyboard.Wpf" Version="5.0.3" />
</ItemGroup>
</Project>
I have attached the VS project if it helps.