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 }