ComponentArt.Web.UI文档汉化之NavBar篇(1)

Creating a NavBar in the Designer
在设计器中创建NavBar控件
You can design a ComponentArt NavBar directly in Visual Studio using the NavBar's built-in designer. The figure below shows the default NavBar that you create with this tutorial. You can change the appearance to suit your site.
你可以直接在Visual Studio中使用NavBar内置的设计器设计ComponentArt NavBar.通过这次的指南,你可以创建如下所示缺省外观的NavBar。你可以修改控件外观以适合自己的站点。

Prerequisites
先决条件
Before creating the navigation bar, you must install the assembly. This only needs to be done once for each Web application.
在创建一个导航条之前,你必须安装这个集合(指ComponentArt.Web.UI控件集)。仅需执行一次就可以在所有的Web应用程序中使用它。
To create a NavBar with the Designer
使用设计器创建一个NavBar
1、Add a new ASP.NET page called navbardesign.aspx to your project.
在你的工程中添间一个名为navbardesign.aspx的ASP.NET页面。
2、in design view, from the toolbox, drag a NavBar and drop it on the design surface.
在设计视图中,从工具箱内拖放一个NavBar到设计页面。
3、Select the NavBar placeholder as shown in the following figure.
选择NavBar占位符如下图所示。

4、Right-click the placeholder and from the context menu, click Build NavBar. The Build NavBar window appears.
右键点击弹出菜单,点击Build NavBar,弹出Build NavBar 窗口。
5、On the Build NavBar window, click the Add Root Item button (shown below) to add a root item to the NavBar.
在Build NavBar窗口,点击“添加根项目”按钮(如下所示)为NavBar添加一个根项目。
6、Select the default text (New Root) and in the properties area to the right, change the Text property to Search Engines.
The new text appears in the left pane as shown in the following figure.
在属性区的右边选择缺省text(New Root),将Text属性修改为Search Engines。新的text将出现在左边如下所示。

7、Click the Add Child Item button (shown below) to add the default child item text to the Search Engines root.
点击“添加子项目”按钮(如下所示)为Search Engines 根添加一个缺省子项目。
8、Select the default text (New Item) and change the Text property to Google. Change the NavigateUrl property to
http://www.google.com/ .
选择缺省text并将其Text属性改为Google,将NavigateUrl属性改为http://www.google.com/ 。
9、Select the Search Engines root item and add another child item. Set the Text property to Yahoo and the NavigateUrl
property to http://www.yahoo.com. When you are finished, click Done. The completed structure looks like the following
figure.
选择“Search Engines”根项,添加其他子项目。将 Text属性设置为Yahoo,NavigateUrl属性设置为
http://www.yahoo.com.完成后单击确定。最后完成的机构类似下图所示。

10、Build and browse the page to view the simple NavBar.
编译并浏览一个简单的NavBar页。
浙公网安备 33010602011771号