Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Keyboard size issue (Read 427 times)
ruki
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 11
Joined: Oct 5th, 2023
Keyboard size issue
Nov 6th, 2023 at 6:19am
Print Post  
I have a strange issue. When the keyboard language key is pressed the entire keyboard resizes (I prefer this size) and the size never changes after that.

Any idea what might be causing this behaviour?

I noticed there is a lot of top space when the keyboard first starts. Then pressing the Lang button the top space decreases.

I am setting a custom layout. However I don't have that much space at the top of the layout in the custom layout.

  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Keyboard size issue
Reply #1 - Nov 6th, 2023 at 7:45am
Print Post  
Is it the expected size if you call keyboard.ForceUpdateLayout() at the end of your initialization code? That should be called internally by TemplateLayout setter anyway, but other properties could be affecting the layout too. Margins around the layout also depend on the Stretch value (equivalent to the Viewbox.Stretch property).

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


I Love MindFusion!

Posts: 11
Joined: Oct 5th, 2023
Re: Keyboard size issue
Reply #2 - Nov 7th, 2023 at 11:28pm
Print Post  
It seems the issue is caused when you set the visibility of the keyboard to collapsed when the window is init. Then change to visible you end up with a gap on the top of the keyboard. Ie wrap the keyboard and set the background to see the issue.

        <StackPanel DockPanel.Dock="Bottom" Background="{StaticResource Footer.Background}">
            <vk:VirtualKeyboard x:Name="VirtualKeyboard" Margin="0 0 0 0" Height="300" />
        </StackPanel>


If you init the window without collapsing the keyboard then all is ok.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Keyboard size issue
Reply #3 - Nov 8th, 2023 at 12:11pm
Print Post  
There is an IME-suggestions panel on top, whose visibility the control toggles when it first detects current language. It's accessed by calling GetTemplateChild method, which returns null when the keyboard hasn't been shown yet, so the panel remains visible (but list inside is empty).

Our developer will fix that for upcoming release. At this time, you can work around that by forcing the keyboard template to load from the window constructor:

Code
Select All
public MainWindow()
{
    InitializeComponent();
    VirtualKeyboard.ApplyTemplate();
} 



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