Share via


WebPartMobileAdapter.CreateWebPartIcon method

NOTE: This API is now obsolete.

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)

Syntax

'Declaration
<ObsoleteAttribute("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see https://go.microsoft.com/fwlink/?LinkId=157231.")> _
Protected Function CreateWebPartIcon ( _
    linkType As WebPartMobileAdapter.WebPartIconLink _
) As Image
'Usage
Dim linkType As WebPartMobileAdapter.WebPartIconLink
Dim returnValue As Image

returnValue = Me.CreateWebPartIcon(linkType)
[ObsoleteAttribute("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see https://go.microsoft.com/fwlink/?LinkId=157231.")]
protected Image CreateWebPartIcon(
    WebPartMobileAdapter.WebPartIconLink linkType
)

Parameters

Return value

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

Remarks

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.

See also

Reference

WebPartMobileAdapter class

WebPartMobileAdapter members

Microsoft.SharePoint.WebPartPages namespace