SharePoint 2013 adds a new, more useful Web Part, which is tilesviewwebpart.
After you create a new team site, you can see it on the home page:
It can also propose a new promoted Link list as a data source
But what if you want to use a custom data source?
The answer is to inherit the Tilesviewwebpart class and override the Gettiles method:
Using system;using system.componentmodel;using system.web;using system.web.ui;using system.web.ui.webcontrols;using System.web.ui.webcontrols.webparts;using microsoft.sharepoint;using microsoft.sharepoint.webcontrols;using Microsoft.sharepoint.webpartpages;using microsoft.sharepoint.utilities;using System.Collections.Generic; namespace tilesview.mytileswebpart{[ToolboxItemAttribute (false)] public class Mytileswebpart:tilesviewwebpart {Private ReadOnly string layoutspath = "/" + Sputility.contextlayoutsfolder + "/tilesview/"; Private readonly string tilestitle = "My first Custom Tileswebpart"; Public Mytileswebpart () {Baseviewid = ((int) tilesbaseviewid.tileview). ToString (); } protected override tiledata[] Gettiles () {list<tiledata> mytiles = new list<tiledata& gt; (); Mytiles.add (new Tiledata {Title = "Google Search", Description = "Google SearCH is the search service provided by Google, Launchbehavior = Tilelaunchbehavior.dialog, Li Nklocation = "http://www.google.com", ID = ten, backgroundimagelocation = Layoutspath + "Goog Le.jpg ", TileOrder = 0}); Mytiles.add (new Tiledata {Title = "Baidu search", Description = "Baidu Search is The best Chinese Search ", Launchbehavior = tilelaunchbehavior.dialog, linklocation =" http: Www.baidu.com ", ID = $, backgroundimagelocation = Layoutspath +" Baidu.jpg ", TileOrder = 1}); Mytiles.add (new Tiledata {Title = "bing search", Description = "Bing search is a Search service which provided by Microsoft ", Launchbehavior = Tilelaunchbehavior.dialog, Li Nklocation = "Http://www.bing.com", ID = $, backgroundimagelocation = Layoutspath + "Bing.jpg", TileOrder = 2, }); return Mytiles.toarray (); } protected override string Viewtitle {get {return tilestitle;} } }}
The results of the extension are as follows: