Building an extensible Silverlight application framework step-6: Organizing the Navigation module "LeftNav"

Source: Internet
Author: User
Tags silverlight

First of all, I want to achieve the effect.

I want the navigation on the left side to click on the right side of the main part of the audible change.

The controls I used before the LeftNav module were ToggleButton and made a style for them. Originally thought is oneself according to ToggleButton as the foundation oneself in makes a compound control to come out. But if you navigate here, the ListBox will be more appropriate. The style of the listbox is similar to the previous ToggleButton style, which is a principle: The view state in each visualstategroup can coexist, and the view state within VisualStateGroup can only appear one at a time, Try not to change the attributes of the same element in multiple visualstategroup at the same time.

Down navigation module "LeftNav" needs to load the navigation profile file "Nav.xml" from the outside, parse the data obtained by it and make data binding to the ListBox. To complete the appeal work, we need to introduce a services module, separate the functions of each function.

Nav.xml:

1 <?xml version="1.0" encoding="utf-8" ?>
2  <root>
3   <module showname="Hello Prism"  xapname="OperatingTableTestModule"  ViewType="OperatingTableTestModule.Views.HelloPrismView,  OperatingTableTestModule, Version=1.0.0.0" />
4   <module  showname="欢迎" xapname="OTWelcomeModule"  ViewType="OTWelcomeModule.Views.OTWelcomeView, OTWelcomeModule,  Version=1.0.0.0" />
5   <module showname="CGArt"  xapname="OTCGArtModule"  ViewType="OT.SL.CGArt2010.Style.Issue._31.Views.OTCGArtView,  OT.SL.CGArt2010.Style.Issue.31, Version=1.0.0.0" />
6   <module  showname="妄摄写真" xapname="OTMosatsu"  ViewType="OTMosatsu.Views.OTMosatsuView, OTMosatsu, Version=1.0.0.0" /> 
7 </root>

Here we first define a navigation entity class, "Ldmodule"

01 namespace OTLeftNavModule.Entities
02 {
03     public  class LdModule
04     {
05         //显示名称
06          public string showname { get; set; }
07          //View类别
08         public string ViewType { get; set; }
09         //Module的名称
10         public string  xapname { get; set; }
11     }
12 }

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.