Articles in this section
Category / Section

How to resize SfRichTextBoxAdv control on showing and hiding InputPane (virtual keyboard) in Windows Phone?

1 min read

How to resize SfRichTextBoxAdv control on showing and hiding InputPane (virtual keyboard) in Windows Phone?

You can resize SfRichTextBoxAdv control on showing and hiding InputPane (virtual keyboard) in Windows Phone using the Showing and Hiding events of InputPane.

The below sample demonstrates to resize SfRichTextBoxAdv control on showing and hiding InputPane in Windows Phone.

Sample

Below are the steps followed in the attached sample to automate resizing of SfRichTextBoxAdv control based on the Showing and Hiding events of InputPane:

  1. Define 2 Grid rows in the XAML main page with height - * and Auto respectively.
  2. Add SfRichTextBoxAdv control to the first row and an empty Grid (inputPaneGrid) to the second row.
  3. Hook event handlers for InputPane Showing and Hiding events, to trigger whenever virtual keyboard is opened and closed respectively.
  4. In InputPane showing event handler, set the empty Grid (inputPaneGrid) height to keyboard height (sender.OccludedRectangle.Height) in order to resize SfRichTextBoxAdv control to remaining height.
  5. In InputPane Hiding event handler, reset the empty Grid (inputPaneGrid) height to 0 in order to fit SfRichTextBoxAdv control in whole page.
    Note:

    In Windows Phone 8 the Showing and Hiding events of the InputPane does not triggered on opening and closing of keyboard respectively. Hence this solution does not work for Windows Phone 8 and this is a known limitation in Windows Phone 8.

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied