Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

WebPartMobileAdapter.CreateWebPartIcon Method

Gets an icon for the Web Part which, in some contexts, works as a link to another view of the Web Part or as an expand/collapse button.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
protected Image CreateWebPartIcon(
	WebPartMobileAdapter.WebPartIconLink linkType


Type: Microsoft.SharePoint.WebPartPages.WebPartMobileAdapter.WebPartIconLink
A value that specifies whether the icon will be just an image or a clickable control.

Return Value

Type: System.Web.UI.MobileControls.Image
An icon that renders beside the Web Part title.

Your code may call CreateWebPartIcon(WebPartMobileAdapter.WebPartIconLink) only in an override of CreateControlsForSummaryView() or CreateControlsForDetailView().

If linkType is NoLink, an icon is rendered. If linkType is anything else, behavior depends on the capabilities of the browser. If it supports expanding and collapsing of a Web Part, then the rendered icon works as an expand/collapse button. Otherwise, the icon is either a link to the detailed view of the Web Part, when the Web Part is being rendered in summary view, or a link to the summary view, when the Web Part is being rendered in detailed view.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.