Hi Andy,
Thanks for using Syncfusion product.
We have checked your requirement, but currently the HTMLUI control not have support for the page up and page down keys. You can refer the following documentation for the supported key operations in this control,
But you can able to achieve your requirement by customizing the KeyUp event of the control. In HTMLUI control provides support to scroll by using the ScrollToElement(which scrolls to the particular element) and ScrollToRectangle(which is used to scroll to specific location). By using these methods you can able to perform the page up and page down operations, please refer the below code snippet and sample.
this.htmluiControl1.KeyUp += HtmluiControl1_KeyUp;
private void HtmluiControl1_KeyUp(object sender, KeyEventArgs e)
{
if(e.KeyData == Keys.PageDown)
{
this.ScrollToEnd();
}
else if(e.KeyData == Keys.PageUp)
{
this.ScrollToTop();
}
}
private void ScrollToTop()
{
IHTMLElement elem = this.htmluiControl1.Document.RenderRoot;
this.htmluiControl1.ScrollToElement(this.htmluiControl1.Document.RenderRoot);
}
private void ScrollToEnd()
{
IHTMLElement elem = this.htmluiControl1.Document.RenderRoot;
Point lastPoint = new Point(0, (elem.Location.Y + elem.Size.Height));
Rectangle rect = new Rectangle(new Point(10, lastPoint.Y - 10), new Size(10, 10));
this.htmluiControl1.ScrollToRectangle(rect, this.htmluiControl1.Document);
} |
You can refer the below UG document for your reference.
Let us know whether this helps also if you need any further assistance on this.
Regards,
Jagadeesan