博客地址 http://blog.csdn.net/foxdave

接上篇点击打开链接

本篇叙述在母版页中应用之前的配置信息生成菜单,主要涉及到母版页的自定义,并应用了第三方控件库DevExpress,感兴趣的可以看看,这套东西很强大,戳这里

新建一个SharePoint项目,添加一个模块Module。Module会自动附带一个sample.txt的文件和一个Elements.xml的定义文件。我们删除掉没用的sample.txt,修改Elements.xml为如下所示

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="MasterPageModule" Url="_catalogs/masterpage">
<File Path="Module\KBMaster.master" Url="KBMaster.master" Type="GhostableInLibrary"/>
</Module>
</Elements>

母版页我们命名为KBMaster.master,这里需要说明的是,在2010中,添加项里是没有母版页的,我们可以通过VS创建一个web应用程序,在这个project里写母版页,写完之后再拷贝到Module下面去。母版页修改一般根据SP默认的最简母版页或者默认母版页进行修改(不要直接修改默认的东西),修改后的母版页核心代码如下(主要是添加菜单控件)

<div id="s4-workspace">
<div id="s4-bodyContainer">
<div id="s4-titlerow" class="s4-pr s4-notdlg s4-titlerowhidetitle">
<div class="s4-title s4-lp">
<div class="s4-title-inner">
<table class="s4-titletable" cellspacing="0">
<tbody>
<tr>
<td class="s4-titlelogo">
<SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" ID="onetidProjectPropertyTitleGraphic">
<SharePoint:SiteLogoImage name="onetidHeadbnnr0" ID="onetidHeadbnnr2" LogoImageUrl="/_layouts/images/siteIcon.png"
runat="server" />
</SharePoint:SPLinkButton>
</td>
<td class="s4-titletext">
<h1 name="onetidProjectPropertyTitle">
<asp:ContentPlaceHolder ID="PlaceHolderSiteName" runat="server">
<SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" ID="onetidProjectPropertyTitle">
<SharePoint:ProjectProperty ID="ProjectProperty1" Property="Title" runat="server" />
</SharePoint:SPLinkButton>
</asp:ContentPlaceHolder>
</h1>
<span id="onetidPageTitleSeparator" class="s4-nothome s4-bcsep s4-titlesep">
<SharePoint:ClusteredDirectionalSeparatorArrow ID="ClusteredDirectionalSeparatorArrow1"
runat="server" />
</span>
<h2>
<asp:ContentPlaceHolder ID="PlaceHolderPageTitleInTitleArea" runat="server" />
</h2>
<div class="s4-pagedescription" tabindex="0">
<asp:ContentPlaceHolder ID="PlaceHolderPageDescription" runat="server" />
</div>
</td>
<td class="s4-socialdata-notif">
<SharePoint:DelegateControl ID="DelegateControl3" ControlId="GlobalSiteLink3" Scope="Farm"
runat="server" />
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="s4-topheader2" class="s4-pr s4-notdlg">
<a name="startNavigation"></a>
<div id="s4-searcharea" class="s4-search s4-rp">
<asp:ContentPlaceHolder ID="PlaceHolderSearchArea" runat="server">
<SharePoint:DelegateControl ID="DelegateControl4" runat="server" ControlId="SmallSearchInputBox"
Version="4" />
</asp:ContentPlaceHolder>
<span class="s4-help"><span style="height: 17px; width: 17px; position: relative;
display: inline-block; overflow: hidden;" class="s4-clust"><a href="#" style="height: 17px;
width: 17px; display: inline-block;" onclick="TopHelpButtonClick('HelpHome');return false"
accesskey="<%$Resources:wss,multipages_helplink_accesskey%>" id="TopHelpLink"
title="<%$Resources:wss,multipages_helplinkalt_text%>" runat="server">
<img id="Img1" src="/_layouts/images/fgimg.png" alt="<%$Resources:wss,multipages_helplinkalt_text%>"
style="left: -0px !important; top: -309px !important; position: absolute;" align="absmiddle"
border="0" runat="server" />
</a></span></span>
</div>
<div class="s4-rp s4-app">
</div>
<div class="s4-lp s4-toplinks">
<asp:ContentPlaceHolder ID="PlaceHolderTopNavBar" runat="server">
<h2 class="ms-hidden">
<SharePoint:EncodedLiteral ID="EncodedLiteral5" runat="server" Text="<%$Resources:wss,topnav_pagetitle%>"
EncodeMethod="HtmlEncode" /></h2>
<asp:ContentPlaceHolder ID="PlaceHolderHorizontalNav" runat="server">
<SharePoint:AspMenu ID="TopNavigationMenuV4" runat="server" EnableViewState="false"
DataSourceID="topSiteMap" AccessKey="<%$Resources:wss,navigation_accesskey%>"
UseSimpleRendering="true" UseSeparateCSS="false" Orientation="Horizontal" StaticDisplayLevels="1"
MaximumDynamicDisplayLevels="2" SkipLinkText="" CssClass="s4-tn" />
<SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" ID="topNavigationDelegate">
<Template_Controls>
<asp:SiteMapDataSource ShowStartingNode="False" SiteMapProvider="SPNavigationProvider"
ID="topSiteMap" runat="server" StartingNodeUrl="sid:1002" />
</Template_Controls>
</SharePoint:DelegateControl>
</asp:ContentPlaceHolder>
</asp:ContentPlaceHolder>
</div>
</div>
</div>
<div id="s4-statusbarcontainer">
<div id="pageStatusBar" class="s4-status-s1">
</div>
</div>
<SharePoint:VisualUpgradePreviewStatus ID="VisualUpgradePreviewStatus1" runat="server" />
<div id="s4-mainarea" class="s4-pr s4-widecontentarea">
<div id="s4-leftpanel" class="s4-notdlg">
<div>
<dx:ASPxNavBar ID="leftNav" runat="server" Width="100%" Font-Names="微软雅黑" Font-Size="12px"
AutoCollapse="True">
<GroupDataFields HeaderImageUrlField="imgurl" NameField="title" NavigateUrlField="url"
TextField="title" />
</dx:ASPxNavBar>
</div>
<div id="s4-leftpanel-content">
<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarDataSource" runat="server" />
<asp:ContentPlaceHolder ID="PlaceHolderCalendarNavigator" runat="server" />
<asp:ContentPlaceHolder ID="PlaceHolderLeftActions" runat="server">
</asp:ContentPlaceHolder>
<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarTop" runat="server" />
<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBar" runat="server">
<div class="ms-quicklaunchouter">
<div class="ms-quickLaunch">
<SharePoint:UIVersionedContent ID="UIVersionedContent1" runat="server" UIVersion="4">
<contenttemplate>
<h2 style="display:inline;" class="ms-hidden"><SharePoint:EncodedLiteral ID="EncodedLiteral6" runat="server" text="<%$Resources:wss,quiklnch_pagetitle%>" EncodeMethod="HtmlEncode"/></h2>
</contenttemplate>
</SharePoint:UIVersionedContent>
<asp:ContentPlaceHolder ID="PlaceHolderQuickLaunchTop" runat="server">
<SharePoint:UIVersionedContent ID="UIVersionedContent2" UIVersion="3" runat="server">
<contenttemplate>
<h3 class="ms-standardheader"><label class="ms-hidden"><SharePoint:EncodedLiteral ID="EncodedLiteral7" runat="server" text="<%$Resources:wss,quiklnch_pagetitle%>" EncodeMethod="HtmlEncode"/></label>
<Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl1" runat="server" PermissionsString="ViewFormPages">
<div class="ms-quicklaunchheader"><SharePoint:SPLinkButton id="idNavLinkViewAll" runat="server" NavigateUrl="~site/_layouts/viewlsts.aspx" Text="<%$Resources:wss,quiklnch_allcontent%>" accesskey="<%$Resources:wss,quiklnch_allcontent_AK%>"/></div>
</SharePoint:SPSecurityTrimmedControl>
</h3>
</contenttemplate>
</SharePoint:UIVersionedContent>
</asp:ContentPlaceHolder>
<SharePoint:SPNavigationManager ID="QuickLaunchNavigationManager" runat="server"
QuickLaunchControlId="QuickLaunchMenu" ContainedControl="QuickLaunch" EnableViewState="false"
CssClass="ms-quicklaunch-navmgr">
<div>
<SharePoint:DelegateControl ID="DelegateControl5" runat="server" ControlId="QuickLaunchDataSource">
<Template_Controls>
<asp:SiteMapDataSource SiteMapProvider="SPNavigationProvider" ShowStartingNode="False"
ID="QuickLaunchSiteMap" StartingNodeUrl="sid:1025" runat="server" />
</Template_Controls>
</SharePoint:DelegateControl>
<SharePoint:UIVersionedContent ID="UIVersionedContent3" UIVersion="3" runat="server">
<contenttemplate>
<SharePoint:AspMenu
id="QuickLaunchMenu"
runat="server"
DataSourceId="QuickLaunchSiteMap"
Orientation="Vertical"
StaticDisplayLevels="2"
ItemWrap="true"
MaximumDynamicDisplayLevels="0"
StaticSubMenuIndent="0"
SkipLinkText=""
CssClass="s4-die"
>
<LevelMenuItemStyles>
<asp:MenuItemStyle CssClass="ms-navheader"/>
<asp:MenuItemStyle CssClass="ms-navitem"/>
</LevelMenuItemStyles>
<LevelSubMenuStyles>
<asp:SubMenuStyle CssClass="ms-navSubMenu1"/>
<asp:SubMenuStyle CssClass="ms-navSubMenu2"/>
</LevelSubMenuStyles>
<LevelSelectedStyles>
<asp:MenuItemStyle CssClass="ms-selectednavheader"/>
<asp:MenuItemStyle CssClass="ms-selectednav"/>
</LevelSelectedStyles>
</SharePoint:AspMenu>
</contenttemplate>
</SharePoint:UIVersionedContent>
<SharePoint:UIVersionedContent ID="UIVersionedContent4" UIVersion="4" runat="server">
<contenttemplate>
<SharePoint:AspMenu
id="V4QuickLaunchMenu"
runat="server"
EnableViewState="false"
DataSourceId="QuickLaunchSiteMap"
UseSimpleRendering="true"
UseSeparateCss="false"
Orientation="Vertical"
StaticDisplayLevels="2"
MaximumDynamicDisplayLevels="0"
SkipLinkText=""
CssClass="s4-ql" />
</contenttemplate>
</SharePoint:UIVersionedContent>
</div>
</SharePoint:SPNavigationManager>
<SharePoint:UIVersionedContent ID="UIVersionedContent5" runat="server" UIVersion="3">
<contenttemplate>
<Sharepoint:SPNavigationManager
id="TreeViewNavigationManager"
runat="server"
ContainedControl="TreeView"
>
<table class="ms-navSubMenu1" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<table class="ms-navheader" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td nowrap="nowrap" id="idSiteHierarchy">
<SharePoint:SPLinkButton runat="server" NavigateUrl="~site/_layouts/viewlsts.aspx" id="idNavLinkSiteHierarchy" Text="<%$Resources:wss,treeview_header%>" accesskey="<%$Resources:wss,quiklnch_allcontent_AK%>"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div class="ms-treeviewouter">
<SharePoint:DelegateControl ID="DelegateControl6" runat="server" ControlId="TreeViewAndDataSource">
<Template_Controls>
<SharePoint:SPHierarchyDataSourceControl
runat="server"
id="TreeViewDataSource"
RootContextObject="Web"
IncludeDiscussionFolders="true"
/>
<SharePoint:SPRememberScroll runat="server" id="TreeViewRememberScroll" onscroll="javascript:_spRecordScrollPositions(this);" style="overflow: auto;height: 400px;width: 150px; ">
<Sharepoint:SPTreeView
id="WebTreeView"
runat="server"
ShowLines="false"
DataSourceId="TreeViewDataSource"
ExpandDepth="0"
SelectedNodeStyle-CssClass="ms-tvselected"
NodeStyle-CssClass="ms-navitem"
NodeStyle-HorizontalPadding="2"
SkipLinkText=""
NodeIndent="12"
ExpandImageUrl="/_layouts/images/tvplus.gif"
CollapseImageUrl="/_layouts/images/tvminus.gif"
NoExpandImageUrl="/_layouts/images/tvblank.gif"
>
</Sharepoint:SPTreeView>
</Sharepoint:SPRememberScroll>
</Template_Controls>
</SharePoint:DelegateControl>
</div>
</Sharepoint:SPNavigationManager>
</contenttemplate>
</SharePoint:UIVersionedContent>
<SharePoint:UIVersionedContent ID="UIVersionedContent6" runat="server" UIVersion="4">
<contenttemplate>
<Sharepoint:SPNavigationManager
id="TreeViewNavigationManagerV4"
runat="server"
ContainedControl="TreeView"
CssClass="s4-treeView"
>
<SharePoint:SPLinkButton runat="server" NavigateUrl="~site/_layouts/viewlsts.aspx" id="idNavLinkSiteHierarchyV4" Text="<%$Resources:wss,treeview_header%>" accesskey="<%$Resources:wss,quiklnch_allcontent_AK%>" CssClass="s4-qlheader" />
<div class="ms-treeviewouter">
<SharePoint:DelegateControl ID="DelegateControl7" runat="server" ControlId="TreeViewAndDataSource">
<Template_Controls>
<SharePoint:SPHierarchyDataSourceControl
runat="server"
id="TreeViewDataSourceV4"
RootContextObject="Web"
IncludeDiscussionFolders="true"
/>
<SharePoint:SPRememberScroll runat="server" id="TreeViewRememberScrollV4" onscroll="javascript:_spRecordScrollPositions(this);" style="overflow: auto;height: 400px;width: 155px; ">
<Sharepoint:SPTreeView
id="WebTreeViewV4"
runat="server"
ShowLines="false"
DataSourceId="TreeViewDataSourceV4"
ExpandDepth="0"
SelectedNodeStyle-CssClass="ms-tvselected"
NodeStyle-CssClass="ms-navitem"
SkipLinkText=""
NodeIndent="12"
ExpandImageUrl="/_layouts/images/tvclosed.png"
ExpandImageUrlRtl="/_layouts/images/tvclosedrtl.png"
CollapseImageUrl="/_layouts/images/tvopen.png"
CollapseImageUrlRtl="/_layouts/images/tvopenrtl.png"
NoExpandImageUrl="/_layouts/images/tvblank.gif"
>
</Sharepoint:SPTreeView>
</Sharepoint:SPRememberScroll>
</Template_Controls>
</SharePoint:DelegateControl>
</div>
</Sharepoint:SPNavigationManager>
</contenttemplate>
</SharePoint:UIVersionedContent>
<asp:ContentPlaceHolder ID="PlaceHolderQuickLaunchBottom" runat="server">
<SharePoint:UIVersionedContent UIVersion="3" runat="server" ID="PlaceHolderQuickLaunchBottomV3">
<contenttemplate>
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="s4-die">
<tr><td>
<table class="ms-recyclebin" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td nowrap="nowrap">
<SharePoint:SPLinkButton runat="server" NavigateUrl="~site/_layouts/recyclebin.aspx" id="v3idNavLinkRecycleBin" ImageUrl="/_layouts/images/recycbin.gif" Text="<%$Resources:wss,StsDefault_RecycleBin%>" PermissionsString="DeleteListItems" />
</td></tr>
</table>
</td></tr>
</table>
</contenttemplate>
</SharePoint:UIVersionedContent>
<SharePoint:UIVersionedContent UIVersion="4" runat="server" ID="PlaceHolderQuickLaunchBottomV4">
<contenttemplate>
<ul class="s4-specialNavLinkList">
<li>
<SharePoint:ClusteredSPLinkButton
runat="server"
NavigateUrl="~site/_layouts/recyclebin.aspx"
ImageClass="s4-specialNavIcon"
ImageUrl="/_layouts/images/fgimg.png"
ImageWidth=16
ImageHeight=16
OffsetX=0
OffsetY=428
id="idNavLinkRecycleBin"
Text="<%$Resources:wss,StsDefault_RecycleBin%>"
CssClass="s4-rcycl"
PermissionsString="DeleteListItems" />
</li>
<li>
<SharePoint:ClusteredSPLinkButton
id="idNavLinkViewAllV4"
runat="server"
PermissionsString="ViewFormPages"
NavigateUrl="~site/_layouts/viewlsts.aspx"
ImageClass="s4-specialNavIcon"
ImageUrl="/_layouts/images/fgimg.png"
ImageWidth=16
ImageHeight=16
OffsetX=0
OffsetY=0
Text="<%$Resources:wss,quiklnch_allcontent_short%>"
accesskey="<%$Resources:wss,quiklnch_allcontent_AK%>"/>
</li>
</ul>
</contenttemplate>
</SharePoint:UIVersionedContent>
</asp:ContentPlaceHolder>
</div>
</div>
</asp:ContentPlaceHolder>
</div>
</div>
<div class="s4-ca s4-ca-dlgNoRibbon" id="MSO_ContentTable">
<div class="s4-die">
<asp:ContentPlaceHolder ID="PlaceHolderPageImage" runat="server" Visible="false" />
<asp:ContentPlaceHolder ID="PlaceHolderTitleLeftBorder" runat="server" Visible="false">
</asp:ContentPlaceHolder>
<div id="onetidPageTitleAreaFrame" class='ms-pagetitleareaframe s4-pagetitle'>
</div>
<asp:ContentPlaceHolder ID="PlaceHolderMiniConsole" runat="server" Visible="false" />
<span class="s4-die">
<asp:ContentPlaceHolder ID="PlaceHolderTitleRightMargin" runat="server" Visible="false" />
</span>
<asp:ContentPlaceHolder ID="PlaceHolderTitleAreaSeparator" runat="server" Visible="false" />
<asp:ContentPlaceHolder ID="PlaceHolderNavSpacer" runat="server" Visible="false">
<img src="/_layouts/images/blank.gif" width='138' height='1' alt="" /></asp:ContentPlaceHolder>
<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarBorder" runat="server" Visible="false">
</asp:ContentPlaceHolder>
<asp:ContentPlaceHolder ID="PlaceHolderBodyLeftBorder" runat="server" Visible="false">
</asp:ContentPlaceHolder>
</div>
<SharePoint:VersionedPlaceHolder UIVersion="3" ID="DesignModeConsoleV3" runat="server">
<asp:ContentPlaceHolder ID="WSSDesignConsole" runat="server">
<wssuc:DesignModeConsole ID="IdDesignModeConsole" runat="server" />
</asp:ContentPlaceHolder>
</SharePoint:VersionedPlaceHolder>
<div class='s4-ba'>
<div class='ms-bodyareacell'>
<div id="MSO_ContentDiv" runat="server">
<a name="mainContent"></a>
<asp:ContentPlaceHolder ID="PlaceHolderMain" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
</div>
<div class="s4-die">
<asp:ContentPlaceHolder ID="PlaceHolderBodyRightMargin" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
</div>
<SharePoint:DeveloperDashboard ID="DeveloperDashboard1" runat="server" />
</div>
</div>

后台主要做的就是从配置XML里面获取到数据,然后让菜单控件根据这个配置信息生成菜单

public partial class KBMaster : MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
this.prepareTopNav();
this.prepareLeftNav();
} private void prepareLeftNav()
{
XmlDataSource dataSource = Config.GetDataSource(SPContext.Current.Web, Config.NavType.Left);
if (string.IsNullOrEmpty(dataSource.Data))
{
this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "LeftNav", "<script>document.getElementById('s4-leftpanel-content').style.display = 'block';</script>");
}
else
{
int num;
bool isAdmin = SPContext.Current.Web.CurrentUser.IsSiteAdmin;
if (!isAdmin)
{
this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "LeftNav", "<script>document.getElementById('s4-leftpanel-content').style.display = 'none';</script>");
}
else
{
this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "LeftNav", "<script>document.getElementById('s4-leftpanel-content').style.display = 'block';</script>");
}
this.leftNav.DataSource = dataSource;
this.leftNav.DataBind();
for (num = 0; num < this.leftNav.Groups.Count; num++)
{
this.leftNav.Groups[num].ContentTemplate = new LeftNavGroupTemplate(dataSource.Data, num);
DevExpress.Web.ASPxTreeView.ASPxTreeView view = (DevExpress.Web.ASPxTreeView.ASPxTreeView)this.leftNav.Groups[num].FindControl("tv" + num);
if (view.SelectedNode != null)
{
view.ExpandToNode(view.SelectedNode);
this.leftNav.Groups[num].Expanded = true;
}
}
}
} private void prepareTopNav()
{
if (this.TopNavigationMenuV4 != null)
{
try
{
XmlDataSource dataSource = Config.GetDataSource(SPContext.Current.Web, Config.NavType.Top);
if (!string.IsNullOrEmpty(dataSource.Data))
{
this.TopNavigationMenuV4.DataSource = dataSource;
this.TopNavigationMenuV4.DataSourceID = "";
this.TopNavigationMenuV4.DataBindings.Clear();
MenuItemBinding binding = new MenuItemBinding
{
DataMember = "SiteMapNode",
TextField = "title",
ValueField = "title",
NavigateUrlField = "url"
};
this.TopNavigationMenuV4.DataBindings.Add(binding);
}
else
{
this.TopNavigationMenuV4.DataSource = null;
this.TopNavigationMenuV4.DataSourceID = "topSiteMap";
}
this.TopNavigationMenuV4.DataBind();
}
catch (Exception exception)
{
SPMIPTrace.WriteError("SPMIPNavigation", exception);
this.TopNavigationMenuV4.DataSource = null;
this.TopNavigationMenuV4.DataSourceID = "topSiteMap";
this.TopNavigationMenuV4.DataBindings.Clear();
this.TopNavigationMenuV4.DataBind();
}
}
}
}

篇幅有限,其他代码将在下一篇附上

接下来处理feature的事件,在激活时应用母版页,在取消激活时还原默认母版页

public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
SPSite parent = (SPSite)properties.Feature.Parent;
SPWeb rootWeb = parent.RootWeb;
rootWeb.MasterUrl = "/_catalogs/masterpage/KBMaster.master";
rootWeb.Update();
} public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
{
SPSite parent = (SPSite)properties.Feature.Parent;
SPWeb rootWeb = parent.RootWeb;
rootWeb.MasterUrl = "/_catalogs/masterpage/v4.master";
rootWeb.Update();
}

SharePoint开发 - 自定义导航菜单(二)母版页的菜单应用的更多相关文章

  1. SharePoint开发 - 自定义导航菜单(一)菜单声明与配置

    博客地址 http://blog.csdn.net/foxdave 本篇描述自定义sharepoint菜单的一种方式,自定义菜单适用于一些门户等需求的网站 自定义的菜单有自己的数据源,可以是数据表,可 ...

  2. SharePoint开发 - 自定义导航菜单(三)附其他代码

    博客地址 http://blog.csdn.net/foxdave 接上篇点击打开链接 LeftNavGroupTemplate.cs internal class LeftNavGroupTempl ...

  3. SharePoint开发 - 自定义页面(错误页、登出页)

    博客地址 http://blog.csdn.net/foxdave 本文叙述如何自定义SharePoint的固有页面,比较简单,用一句话说就是"做个页面,写一句代码." 创建Sha ...

  4. 步步为营 SharePoint 开发学习笔记系列总结

    转:http://www.cnblogs.com/springyangwc/archive/2011/08/03/2126763.html 概要 为时20多天的sharepoint开发学习笔记系列终于 ...

  5. 安卓开发_浅谈OptionsMenus(选项菜单)

    Android平台下所提供的菜单大体上可分为三类:选项菜单.上下文菜单和子菜单. 当Activity在前台运行时,如果用户按下手机上的Menu键,此时就会在屏幕低端弹出相应的选项菜单.但这个功能需要开 ...

  6. 为SharePoint网站创建自定义导航菜单

    转:http://kaneboy.blog.51cto.com/1308893/397779 相信不少人都希望把SharePoint网站内置的那个顶部导航菜单,换成自己希望的样式.由于SharePoi ...

  7. SharePoint 2013 自定义扩展菜单(二)

    接博文<SharePoint 2013 自定义扩展菜单>,多加了几个例子,方便大家理解. 例七 列表设置菜单扩展(listedit.aspx) 扩展效果 XML描述 <CustomA ...

  8. NX二次开发-自定义添加右键菜单RegisterConfigureContextMenuCallback

    首先声明这个知识我以前不知道,是夏天的时候看到别人在唐工的QQ群里问的,唐工说西门子官方有这个例子.那个时候我因为在忙其他事情,也就没去研究那个右键菜单到底是怎么做的.关于自定义添加右键菜单Regis ...

  9. SharePoint 2013 自定义扩展菜单

    在对SharePoint进行开发或者功能扩展的时候,经常需要对一些默认的菜单进行扩展,以使我们开发的东西更适合SharePoint本身的样式.SharePoint的各种功能菜单,像网站设置.Ribbo ...

随机推荐

  1. hiho_1290_demo_day

    题目大意 一个MxN的矩阵,矩阵中的有些方格中有障碍物,有些没有,有一个机器人从左上角出发,它只能有两种移动方式:一直向右移动,直到遇到障碍物:一直向下移动,直到遇到障碍物.     现在可以将矩阵中 ...

  2. python语法笔记(四)

    1.对象的属性     python一切皆对象,每个对象都可能有多个属性.python的属性有一套统一的管理方案. 属性的__dict__系统     对象的属性可能来自于其类定义,叫做类属性:还可能 ...

  3. jQuery Ajax学习

    地址:http://www.w3school.com.cn/jquery/jquery_ref_ajax.asp

  4. Eclipse远程调试出现“JDWP Transport dt_socket failed to initialize”的解决方案

    欢迎关注我的社交账号: 博客园地址: http://www.cnblogs.com/jiangxinnju/p/4781259.html GitHub地址: https://github.com/ji ...

  5. AOP 之 6.1 AOP基础(拾陆)

    6.1.1  AOP是什么 考虑这样一个问题:需要对系统中的某些业务做日志记录,比如支付系统中的支付业务需要记录支付相关日志,对于支付系统可能相当复杂,比如可能有自己的支付系统,也可能引入第三方支付平 ...

  6. 用XmlSerializer进行xml反序列化的时候,程序报错: 不应有 <xml xmlns=''>

    原因 一,类型错误: 比如xml本来是UserInfo类型 用XmlSerializer进行反序列化传入的类型是MemberInfo这就会报错 二,xml根节点和对象的类名不一致,而又没有对类加入[X ...

  7. offsetLeft,Left,clientLeft的区别

    offsetLeft,Left,clientLeft的区别 假设 obj 为某个 HTML 控件. obj.offsetTop 指 obj 相对于版面或由 offsetParent 属性指定的父坐标的 ...

  8. HDU 4123(树的直径+单调队列)

    Bob’s Race Time Limit: 5000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total ...

  9. 转载:Javascript作用域原理

    首先看一个例子: var name = 'laruence'; function echo() { alert(name); var name = 'eve'; alert(name); alert( ...

  10. BZOJ3689 异或之

    我们需要知道一个事实,trie树上是可以要求第k大的! 我们每个节点记个size值然后像其他数据结构一样维护就可以了 然后我们再搞个priority_queue什么的就好了,注意每个值会出现两次只要记 ...