Eyeshot issues with DevExpress controls

Issue 1: RibbonForm

When using Eyeshot control inside a DevExpress RibbonForm, sometimes the Eyeshot control disappears due to missing Paint messages.

This problem was discussed in this thread 


and can be solved by adding the following overridden property to the RibbonForm

protected override bool SupportAdvancedTitlePainting 
   get { return false; } 


Issue 2: MDI

When creating MDI forms, especially with Hardware Acceleration disabled (as in the case when using a Virtual Machine or a Terminal Server connection) and in Tabbed layout, the Eyeshot graphics may be clipped (see picture below).


To fix it is necessary to force a resize of the control, by modifying the Form containing the Eyeshot control like this:

protected override void OnShown(EventArgs e) 

public void ResizeVP()
    design1.Visible = false;
    Size mySize = design1.Size;
    design1.Size = new Size(mySize.Width - 1, mySize.Height - 1);
    design1.Size = mySize;
    design1.Visible = true;


If the Eyeshot control is inside a UserControl, then it is necessary to force the resize of the control by subscribing TabbedView's events like shown here below:

public Form1()

     tabbedView1.DocumentActivated += tabbedView1_DocumentActivated;
     tabbedView1.Paint += tabbedView1_Paint;

private bool refreshVP = false;

void tabbedView1_Paint(object sender, PaintEventArgs e)
      if (refreshVP) 
            var documents = ((DevExpress.XtraBars.Docking2010.Views.Tabbed.TabbedView)sender).Documents;

            foreach (var doc in documents)
                if (doc.Control is MyUserControl)

            refreshVP = false;

private void tabbedView1_DocumentActivated(object sender, DevExpress.XtraBars.Docking2010.Views.DocumentEventArgs e)
     refreshVP = true;


Issue 3: MDI on NVidia

With NVidia cards, it may happen that when closing a Document of a TabbedView with Eyeshot control inside, even if the control is properly disposed and its graphics resources are freed on the tabbed view remains the frozen graphics of the Eyeshot control. This does not go away until a new Eyeshot control is created (for instance adding a new tab page). It even goes outside the Form borders if it's resized.

To avoid this issue you can subscribe to the DocumentClosing event of the tabbed view, and right before closing does a resize to 1x1 dimension of the Eyeshot control:

private void Form1_Load(object sender, EventArgs e) 
    // ... 
    tabbedView1.DocumentClosing += new DevExpress.XtraBars.Docking2010.Views.DocumentCancelEventHandler(tabbedView1_DocumentClosing); 

void tabbedView1_DocumentClosing(object sender, DevExpress.XtraBars.Docking2010.Views.DocumentCancelEventArgs e) 
    // MyUserControl is the user control with the Eyeshot control inside 
    Design d = ((MyUserControl)e.Document.Control).design1;
    d.Size = new Size(1, 1);


Issue 4: DockLayoutManager and WPF Immediate Mode rendering

Eyeshot WPF with Immediate Mode rendering does not support some features like floating window and overlay handling.
For example, opening a BackstagePanel, the Eyeshot control overlays the content.


And using a floating window, Eyeshot control using Immediate Mode rendering disappears.


For those cases, we suggest using Eyeshot with Native or Native Experimental render.

Was this article helpful?
7 out of 7 found this helpful


Date Votes
  • That fixed it. Thank you

  • I can not find the Sub OnShown (EventArgs e) in vb.net

    can you help me

    Deni Frigo

  • Encountered "issue 3" while using a ViewportLayout in a WindowsForms project.

    VL is embedded in a stock TableLayoutPanel, shown inside a dialog form.

    The only working solution was adding a new invisible ViewportLayout to the parent form controls after the dialog had been closed.


Please sign in to leave a comment.

Articles in this section