Thank you Stefan, it works fine. I'm trying to figure out how to have the close button appear when I hover over a page, the same as VS 2012 does. How would I achieve that - in the MouseEnter
or MouseHover event?
Here is the code I used for when a tab is changed, I would still need this. I wasn't sure how to identify the page I never want closed, so I used the name (pgmain). I also had to add the On Error part as I was getting an error when starting the project. "An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object."
Private Sub pageViewDocs_SelectedPageChanging(sender As Object, e As RadPageViewCancelEventArgs) Handles pageViewDocs.SelectedPageChanging
On Error Resume Next
pageViewDocs.SelectedPage.Item.ButtonsPanel.CloseButton.Visibility = ElementVisibility.Collapsed
If e.Page.Name.ToLower <> "pgmain" Then
e.Page.Item.ButtonsPanel.CloseButton.Visibility = ElementVisibility.Visible