Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic WPF keyboard layout (Read 2258 times)
TuanLe
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 1
Joined: Nov 7th, 2021
WPF keyboard layout
Nov 7th, 2021 at 6:09am
Print Post  
Hi,
I am using the virtual keyboard in WPF application, and I have some problems with the layout.
I saw by default, the keyboard layout is adding a panel with the name is PART_JKCStack, which is not occur in v4.x. I am not sure it is used for what but in my view, I would like to remove that and make a fit layout, so do we some property to set, or some way to work around?
I am using latest version, v5.0.1.
Thank you.
  

mindfusion_keyboard.PNG ( 197 KB | 113 Downloads )
mindfusion_keyboard.PNG
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: WPF keyboard layout
Reply #1 - Nov 8th, 2021 at 7:50am
Print Post  
Hi,

It might be safe to remove from the Xaml template if you don't use the LoadImeTable method. Or you could set that panel's Visibility to Collapsed and it shouldn't interfere with the layout.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: WPF keyboard layout
Reply #2 - Nov 9th, 2021 at 11:02am
Print Post  
This build changes IME panel's default visibility to collapsed -
https://mindfusion.eu/_temp/vk_ime_collapsed.zip

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
GB_Rollo
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Joined: Mar 17th, 2023
Re: WPF keyboard layout
Reply #3 - Mar 17th, 2023 at 9:49am
Print Post  
Hi,

I've faced this situation too.
Can you please report those changes (PART_JKCStack Visibility => Collapsed) to an official version ?

Thank you,
Guillaume
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: WPF keyboard layout
Reply #4 - Mar 20th, 2023 at 9:11am
Print Post  
Hi,

That's official since v5.0.2; you could also try changing the keyboard.Stretch property for different treatments of the margin space.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
GB_Rollo
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Joined: Mar 17th, 2023
Re: WPF keyboard layout
Reply #5 - Mar 20th, 2023 at 3:02pm
Print Post  
Hi,

Thank you for your answer.

I'm currently using the v5.0.3 and still having trouble with this panel showing on top of keyboard.

Here an simplified extract of my view using the virtual keyboard assuming there is a Property KeyboardCustomLayout in the ViewModel.

Using the workaround (see comment in the code below), this panel is no more shown in any cases. Otherwise, the panel is visible until an hypotetical call on MindFusion.UI.Wpf.VirtualKeyboard.NativeMethods_CultureChanged().

Saddly the call on ShowSuggestionsPanel() in the VirtualKeyboard_Loaded() method is in my case "too early" because of the use of the tabcontrol. So the instruction
Code (C++)
Select All
GetTemplateChild("PART_JKCStack") 

is always returning null when loading the control and visibility stay as Visible when showing the control (until the hypotetical call on CultureChanged()).

A way to fix that should : call the ShowSuggesionsPanel on the render event (OnRender) of the control, not on the load event.

Code (HTML)
Select All
<WhatEverWindow x:Class="xxx.xxx.Views.MainWindowView"
...
xmlns:vk="http://mindfusion.eu/keyboard/wpf"
xmlns:views="clr-namespace:xxx.xxx.Views">

  <TabControl>
    <TabItem>
    ...
    </TabItem>
    <TabItem>
      <TabItem.Header>
        <Border Background="DarkGreen"></Border>
      </TabItem.Header>
      <vk:VirtualKeyboard Mode="Custom" TemplateLayout="{Binding KeyboardCustomLayout.Value, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=views:MainWindowView}}" >
        <vk:VirtualKeyboard.Resources>
		  <Style TargetType="StackPanel"> <!--WORKAROUND TO COLLAPSE UNWANTED STACKPANEL-->
            <Style.Triggers>
              <Trigger Property="Name" Value="PART_JKCStack">
                <Setter Property="Visibility" Value="Collapsed" />
              </Trigger>
            </Style.Triggers>
          </Style>
        </vk:VirtualKeyboard.Resources>
      </vk:VirtualKeyboard>
    </TabItem>
  </TabControl>
</WhatEverWindow>
 



Thank you,
Guillaume
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: WPF keyboard layout
Reply #6 - Mar 21st, 2023 at 8:28am
Print Post  
Hi,

If using custom templates, maybe a better way is to just set Visibility="Collapsed" as default value in Xaml.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint