This is a migrated thread and some comments may be shown as answers.

PageView multiple icons/indicators in tab

2 Answers 132 Views
PageView
This is a migrated thread and some comments may be shown as answers.
Adam P
Top achievements
Rank 2
Adam P asked on 16 Aug 2014, 08:02 AM
I have a RadPageView control in ViewMode = Strip (so it appears like a TabControl)

I would like to somehow have multiple Images for the RadPageViewPage - one that represents the actual document icon, and another that is only shown when there are unsaved changes. 

Just as an example, take a look at the following screenshot of Visual Studio:
http://i.stack.imgur.com/dPEq0.png

Is this possible?  Any ideas how I can accomplish that? 

I don't have any problem getting one Image to show up (using the RadPageViewPage.Image property) but how would I go about getting the second one to appear?

Thank you!

2 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 20 Aug 2014, 12:56 PM
Hello Adam,

Thank you for writing.

It is possible to assign an image to the RadPageViewPage, which is displayed before the tab title by default. In addition, you can show the close button for each page and use it as a second image. However, in order to avoid closing the tab, you can stop the mouse handling. When the image is not necessary to be displayed, you can set the RadPageViewStripItem.ButtonsPanel.CloseButton.Image property to null:
//show close buttons for each tab
this.radPageView1.ViewElement.ShowItemCloseButton = true;
 
RadPageViewStripElement stripView = this.radPageView1.ViewElement as RadPageViewStripElement;
if (stripView != null)
{
    RadPageViewStripItem item = stripView.Items.First() as RadPageViewStripItem;
    item.Image = Properties.Resources.telerik_icon;
    item.ButtonsPanel.CloseButton.Image = Properties.Resources.transparent;
 
    //avoid closing the tab when clicking the button
    item.ButtonsPanel.CloseButton.ShouldHandleMouseInput = false;               
}

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Adam P
Top achievements
Rank 2
answered on 10 Sep 2014, 01:16 AM
Thank you, I'm going to get this implemented tomorrow!
Tags
PageView
Asked by
Adam P
Top achievements
Rank 2
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Adam P
Top achievements
Rank 2
Share this question
or