-
StackOverflow 文件
-
sharepoint 教程
-
使用託管客戶端物件模型(CSOM)
-
自定義動作。修改使用者自定義操作
string urlWebsite = "http://MyServer/sites/SiteCollection";
ClientContext clientContext = new ClientContext(urlWebsite);
Web oWebsite = clientContext.Web;
List oList = oWebsite.Lists.GetByTitle("My List");
UserCustomActionCollection collUserCustomAction = oList.UserCustomActions;
clientContext.Load(collUserCustomAction,
userCustomActions => userCustomActions.Include(
userCustomAction => userCustomAction.Title));
clientContext.ExecuteQuery();
foreach (UserCustomAction oUserCustomAction in collUserCustomAction)
{
if (oUserCustomAction.Title == "My First User Custom Action")
{
oUserCustomAction.ImageUrl = "http://MyServer/_layouts/images/MyIcon.png";
oUserCustomAction.Update();
clientContext.ExecuteQuery();
}
}