New to Telerik UI for WinForms? Download free 30-day trial

Peek Window

RadPageView provides popup preview option for its elements when the mouse is over them. This functionality is disabled by default. To enable it, you can set the EnablePeekPopup property to true.

WinForms RadPageView Peek Window


this.radPageView1.EnablePeekPopup = true;


Me.radPageView1.EnablePeekPopup = True


To set a content for each peek window, we can use the PeekPopupOpening event. In the event handler, we have access to the current hovered RadPageViewItem and depending on it, we can set the Page.PeekPopupContent property. This property is of type Control.

The Peek Window will take the size of its content. This needs to be considered while using UserControl as a content of the Peek Window.


private void RadPageView1_PeekPopupOpening(object sender, Telerik.WinControls.UI.OfficeNavigationBar.RadPageViewPeekPopupEventArgs e)
{
    RadLabel content = new RadLabel();
    content.Text = e.Page.Item.Text;
    content.Font = new Font("Segoe UI Semibold", 27f);
    content.LoadElementTree();
    e.Page.PeekPopupContent = content;
}


Private Sub RadPageView1_PeekPopupOpening(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.OfficeNavigationBar.RadPageViewPeekPopupEventArgs)
    Dim content As RadLabel = New RadLabel()
    content.Text = e.Page.Item.Text
    content.Font = New Font("Segoe UI Semibold", 27F)
    content.LoadElementTree()
    e.Page.PeekPopupContent = content
End Sub


In the following image we can see the Peek Window content when it hosts a custom user control.

WinForms RadPageView Peek Window Content

See Also

In this article