WPF Prsim(一)Region
WPF Prism(二)Module
WPF Prism(三)ViewModelLocator
WPF Prism(四)MVVM
WPF Prism(五)Navigation
WPF Prism(六)Dialog

一、使用场景

在普遍的业务场景当中,必不可少的是页面切换,而Prism就可以使用Navigation功能来进行页面导航,在不同的场景当中会有各种用法,例如在切换页面验证、传递参数、返回上一页、返回下一页等功能。

二、导航的使用

2.1 注册显示区域(region)

这个在前面章节已做详细介绍不再赘述。

2.2 注册导航页面(View)

之前的介绍中我们一般是将一个View指定到一个region中。而现在我们需要将多个View注册到导航中。例如我们现在有两个子模块(ViewAModule和ViewBModule),我们分别注册导航界面:

    public class ViewAModule : IModule{public void OnInitialized(IContainerProvider containerProvider){}public void RegisterTypes(IContainerRegistry containerRegistry){containerRegistry.RegisterForNavigation(typeof(ViewA.Views.ViewA), "ViewA");}}
    public class ViewBModule : IModule{public void OnInitialized(IContainerProvider containerProvider){}public void RegisterTypes(IContainerRegistry containerRegistry){containerRegistry.RegisterForNavigation(typeof(ViewB.Views.ViewB), "ViewB");}}

注意这一段代码:

containerRegistry.RegisterForNavigation(typeof(ViewB.Views.ViewB), "ViewB");

这就代码就是注册导航页面的,其中第一个参数是View的类型,第二个参数是ViewName(可省略,则默认为View类型的类名)。当然,这句代码也可以在App类中的重写函数中实现。

        protected override void RegisterTypes(IContainerRegistry containerRegistry){containerRegistry.RegisterForNavigation(typeof(ViewA.Views.ViewA), "ViewA");containerRegistry.RegisterForNavigation(typeof(ViewB.Views.ViewB), "ViewB");}

然后我们在主界面上添加两个按钮用于导航:

    <Grid><Grid.RowDefinitions><RowDefinition Height="auto" /><RowDefinition /></Grid.RowDefinitions><StackPanelGrid.Row="0"Margin="10"Orientation="Horizontal"><ButtonWidth="40"Height="30"Margin="40,0,40,0"Command="{Binding NavigationCmd}"CommandParameter="ViewA"Content="ViewA" /><ButtonWidth="40"Height="30"Margin="40,0,40,0"Command="{Binding NavigationCmd}"CommandParameter="ViewB"Content="ViewB" /></StackPanel><ContentControl Grid.Row="1" prism:RegionManager.RegionName="ContentRegion" /></Grid>

在MainViewModel中我们进行了一些数据的绑定:

    public class MainWindowViewModel : BindableBase{public DelegateCommand<string> NavigationCmd { get; private set; }private IRegionManager region;public MainWindowViewModel(IRegionManager regionManager){this.region = regionManager;NavigationCmd = new DelegateCommand<string>(Navigation);}private void Navigation(string page){region.RequestNavigate("ContentRegion", page);}}

注意这一段代码:

region.RequestNavigate("ContentRegion", page);

第一个参数是RegionName,第二个参数是我们前面注册的ViewName。其实它还有很多重载函数,还有另外两个参数Action navigationCallbackNavigationParameters navigationParameters

2.3 导航完成后的回调

        private void Navigation(string page){region.RequestNavigate("ContentRegion", page,NavigationCallback);}private void NavigationCallback(NavigationResult result){Console.WriteLine(result.Context.Uri);Console.WriteLine(result.Error.Message);Console.WriteLine(result.Result.Value);}

请求导航完成的回调函数。

2.4 请求导航时的参数

        private void Navigation(string page){NavigationParameters parameters= new NavigationParameters("param1");region.RequestNavigate("ContentRegion", page,NavigationCallback, parameters);}

这个参数有什么用,怎么用,我们在后面详说。

2.5 INavigationAware

我们导航切换界面到底是一个什么过程呢?这样我们需要了解INavigationAware接口。该接口有三个方法需要实现。

        public void OnNavigatedTo(NavigationContext navigationContext){throw new NotImplementedException();}public bool IsNavigationTarget(NavigationContext navigationContext){throw new NotImplementedException();}public void OnNavigatedFrom(NavigationContext navigationContext){throw new NotImplementedException();}
  • OnNavigatedTo: 导航到当前页面前, 此处可以传递过来的参数以及是否允许导航等动作的控制
  • IsNavigationTarget: 是否创建新示例。为true的时候表示不创建新示例,页面还是之前的;如果为false,则创建新的页面。
  • OnNavigatedFrom: 导航离开当前页面前。

传递参数示例:

  var parameters = new NavigationParameters();parameters.Add("person", person);
        public void OnNavigatedTo(NavigationContext navigationContext){var person = navigationContext.Parameters["person"] as Person;if (person != null)SelectedPerson = person;}

注意,这个接口应该由ViewModel来继承。

所以一个完整的导航请求的过程如下:

#mermaid-svg-pGA6WndbuaH9yKx1 .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-pGA6WndbuaH9yKx1 .label text{fill:#333}#mermaid-svg-pGA6WndbuaH9yKx1 .node rect,#mermaid-svg-pGA6WndbuaH9yKx1 .node circle,#mermaid-svg-pGA6WndbuaH9yKx1 .node ellipse,#mermaid-svg-pGA6WndbuaH9yKx1 .node polygon,#mermaid-svg-pGA6WndbuaH9yKx1 .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-pGA6WndbuaH9yKx1 .node .label{text-align:center;fill:#333}#mermaid-svg-pGA6WndbuaH9yKx1 .node.clickable{cursor:pointer}#mermaid-svg-pGA6WndbuaH9yKx1 .arrowheadPath{fill:#333}#mermaid-svg-pGA6WndbuaH9yKx1 .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-pGA6WndbuaH9yKx1 .flowchart-link{stroke:#333;fill:none}#mermaid-svg-pGA6WndbuaH9yKx1 .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-pGA6WndbuaH9yKx1 .edgeLabel rect{opacity:0.9}#mermaid-svg-pGA6WndbuaH9yKx1 .edgeLabel span{color:#333}#mermaid-svg-pGA6WndbuaH9yKx1 .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-pGA6WndbuaH9yKx1 .cluster text{fill:#333}#mermaid-svg-pGA6WndbuaH9yKx1 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-pGA6WndbuaH9yKx1 .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-pGA6WndbuaH9yKx1 text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-pGA6WndbuaH9yKx1 .actor-line{stroke:grey}#mermaid-svg-pGA6WndbuaH9yKx1 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-pGA6WndbuaH9yKx1 .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-pGA6WndbuaH9yKx1 #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-pGA6WndbuaH9yKx1 .sequenceNumber{fill:#fff}#mermaid-svg-pGA6WndbuaH9yKx1 #sequencenumber{fill:#333}#mermaid-svg-pGA6WndbuaH9yKx1 #crosshead path{fill:#333;stroke:#333}#mermaid-svg-pGA6WndbuaH9yKx1 .messageText{fill:#333;stroke:#333}#mermaid-svg-pGA6WndbuaH9yKx1 .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-pGA6WndbuaH9yKx1 .labelText,#mermaid-svg-pGA6WndbuaH9yKx1 .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-pGA6WndbuaH9yKx1 .loopText,#mermaid-svg-pGA6WndbuaH9yKx1 .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-pGA6WndbuaH9yKx1 .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-pGA6WndbuaH9yKx1 .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-pGA6WndbuaH9yKx1 .noteText,#mermaid-svg-pGA6WndbuaH9yKx1 .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-pGA6WndbuaH9yKx1 .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-pGA6WndbuaH9yKx1 .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-pGA6WndbuaH9yKx1 .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-pGA6WndbuaH9yKx1 .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pGA6WndbuaH9yKx1 .section{stroke:none;opacity:0.2}#mermaid-svg-pGA6WndbuaH9yKx1 .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-pGA6WndbuaH9yKx1 .section2{fill:#fff400}#mermaid-svg-pGA6WndbuaH9yKx1 .section1,#mermaid-svg-pGA6WndbuaH9yKx1 .section3{fill:#fff;opacity:0.2}#mermaid-svg-pGA6WndbuaH9yKx1 .sectionTitle0{fill:#333}#mermaid-svg-pGA6WndbuaH9yKx1 .sectionTitle1{fill:#333}#mermaid-svg-pGA6WndbuaH9yKx1 .sectionTitle2{fill:#333}#mermaid-svg-pGA6WndbuaH9yKx1 .sectionTitle3{fill:#333}#mermaid-svg-pGA6WndbuaH9yKx1 .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pGA6WndbuaH9yKx1 .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-pGA6WndbuaH9yKx1 .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pGA6WndbuaH9yKx1 .grid path{stroke-width:0}#mermaid-svg-pGA6WndbuaH9yKx1 .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-pGA6WndbuaH9yKx1 .task{stroke-width:2}#mermaid-svg-pGA6WndbuaH9yKx1 .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pGA6WndbuaH9yKx1 .taskText:not([font-size]){font-size:11px}#mermaid-svg-pGA6WndbuaH9yKx1 .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pGA6WndbuaH9yKx1 .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-pGA6WndbuaH9yKx1 .task.clickable{cursor:pointer}#mermaid-svg-pGA6WndbuaH9yKx1 .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-pGA6WndbuaH9yKx1 .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-pGA6WndbuaH9yKx1 .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-pGA6WndbuaH9yKx1 .taskText0,#mermaid-svg-pGA6WndbuaH9yKx1 .taskText1,#mermaid-svg-pGA6WndbuaH9yKx1 .taskText2,#mermaid-svg-pGA6WndbuaH9yKx1 .taskText3{fill:#fff}#mermaid-svg-pGA6WndbuaH9yKx1 .task0,#mermaid-svg-pGA6WndbuaH9yKx1 .task1,#mermaid-svg-pGA6WndbuaH9yKx1 .task2,#mermaid-svg-pGA6WndbuaH9yKx1 .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-pGA6WndbuaH9yKx1 .taskTextOutside0,#mermaid-svg-pGA6WndbuaH9yKx1 .taskTextOutside2{fill:#000}#mermaid-svg-pGA6WndbuaH9yKx1 .taskTextOutside1,#mermaid-svg-pGA6WndbuaH9yKx1 .taskTextOutside3{fill:#000}#mermaid-svg-pGA6WndbuaH9yKx1 .active0,#mermaid-svg-pGA6WndbuaH9yKx1 .active1,#mermaid-svg-pGA6WndbuaH9yKx1 .active2,#mermaid-svg-pGA6WndbuaH9yKx1 .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-pGA6WndbuaH9yKx1 .activeText0,#mermaid-svg-pGA6WndbuaH9yKx1 .activeText1,#mermaid-svg-pGA6WndbuaH9yKx1 .activeText2,#mermaid-svg-pGA6WndbuaH9yKx1 .activeText3{fill:#000 !important}#mermaid-svg-pGA6WndbuaH9yKx1 .done0,#mermaid-svg-pGA6WndbuaH9yKx1 .done1,#mermaid-svg-pGA6WndbuaH9yKx1 .done2,#mermaid-svg-pGA6WndbuaH9yKx1 .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-pGA6WndbuaH9yKx1 .doneText0,#mermaid-svg-pGA6WndbuaH9yKx1 .doneText1,#mermaid-svg-pGA6WndbuaH9yKx1 .doneText2,#mermaid-svg-pGA6WndbuaH9yKx1 .doneText3{fill:#000 !important}#mermaid-svg-pGA6WndbuaH9yKx1 .crit0,#mermaid-svg-pGA6WndbuaH9yKx1 .crit1,#mermaid-svg-pGA6WndbuaH9yKx1 .crit2,#mermaid-svg-pGA6WndbuaH9yKx1 .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-pGA6WndbuaH9yKx1 .activeCrit0,#mermaid-svg-pGA6WndbuaH9yKx1 .activeCrit1,#mermaid-svg-pGA6WndbuaH9yKx1 .activeCrit2,#mermaid-svg-pGA6WndbuaH9yKx1 .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-pGA6WndbuaH9yKx1 .doneCrit0,#mermaid-svg-pGA6WndbuaH9yKx1 .doneCrit1,#mermaid-svg-pGA6WndbuaH9yKx1 .doneCrit2,#mermaid-svg-pGA6WndbuaH9yKx1 .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-pGA6WndbuaH9yKx1 .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-pGA6WndbuaH9yKx1 .milestoneText{font-style:italic}#mermaid-svg-pGA6WndbuaH9yKx1 .doneCritText0,#mermaid-svg-pGA6WndbuaH9yKx1 .doneCritText1,#mermaid-svg-pGA6WndbuaH9yKx1 .doneCritText2,#mermaid-svg-pGA6WndbuaH9yKx1 .doneCritText3{fill:#000 !important}#mermaid-svg-pGA6WndbuaH9yKx1 .activeCritText0,#mermaid-svg-pGA6WndbuaH9yKx1 .activeCritText1,#mermaid-svg-pGA6WndbuaH9yKx1 .activeCritText2,#mermaid-svg-pGA6WndbuaH9yKx1 .activeCritText3{fill:#000 !important}#mermaid-svg-pGA6WndbuaH9yKx1 .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pGA6WndbuaH9yKx1 g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-pGA6WndbuaH9yKx1 g.classGroup text .title{font-weight:bolder}#mermaid-svg-pGA6WndbuaH9yKx1 g.clickable{cursor:pointer}#mermaid-svg-pGA6WndbuaH9yKx1 g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-pGA6WndbuaH9yKx1 g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-pGA6WndbuaH9yKx1 .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-pGA6WndbuaH9yKx1 .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-pGA6WndbuaH9yKx1 .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-pGA6WndbuaH9yKx1 .dashed-line{stroke-dasharray:3}#mermaid-svg-pGA6WndbuaH9yKx1 #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-pGA6WndbuaH9yKx1 #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-pGA6WndbuaH9yKx1 #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-pGA6WndbuaH9yKx1 #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-pGA6WndbuaH9yKx1 #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-pGA6WndbuaH9yKx1 #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-pGA6WndbuaH9yKx1 #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-pGA6WndbuaH9yKx1 #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-pGA6WndbuaH9yKx1 .commit-id,#mermaid-svg-pGA6WndbuaH9yKx1 .commit-msg,#mermaid-svg-pGA6WndbuaH9yKx1 .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pGA6WndbuaH9yKx1 .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pGA6WndbuaH9yKx1 .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pGA6WndbuaH9yKx1 g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pGA6WndbuaH9yKx1 g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-pGA6WndbuaH9yKx1 g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-pGA6WndbuaH9yKx1 g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-pGA6WndbuaH9yKx1 g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-pGA6WndbuaH9yKx1 g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-pGA6WndbuaH9yKx1 .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-pGA6WndbuaH9yKx1 .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-pGA6WndbuaH9yKx1 .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-pGA6WndbuaH9yKx1 .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-pGA6WndbuaH9yKx1 .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-pGA6WndbuaH9yKx1 .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-pGA6WndbuaH9yKx1 .edgeLabel text{fill:#333}#mermaid-svg-pGA6WndbuaH9yKx1 .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pGA6WndbuaH9yKx1 .node circle.state-start{fill:black;stroke:black}#mermaid-svg-pGA6WndbuaH9yKx1 .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-pGA6WndbuaH9yKx1 #statediagram-barbEnd{fill:#9370db}#mermaid-svg-pGA6WndbuaH9yKx1 .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-pGA6WndbuaH9yKx1 .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-pGA6WndbuaH9yKx1 .statediagram-state .divider{stroke:#9370db}#mermaid-svg-pGA6WndbuaH9yKx1 .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-pGA6WndbuaH9yKx1 .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-pGA6WndbuaH9yKx1 .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-pGA6WndbuaH9yKx1 .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-pGA6WndbuaH9yKx1 .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-pGA6WndbuaH9yKx1 .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-pGA6WndbuaH9yKx1 .note-edge{stroke-dasharray:5}#mermaid-svg-pGA6WndbuaH9yKx1 .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-pGA6WndbuaH9yKx1 .error-icon{fill:#522}#mermaid-svg-pGA6WndbuaH9yKx1 .error-text{fill:#522;stroke:#522}#mermaid-svg-pGA6WndbuaH9yKx1 .edge-thickness-normal{stroke-width:2px}#mermaid-svg-pGA6WndbuaH9yKx1 .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-pGA6WndbuaH9yKx1 .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-pGA6WndbuaH9yKx1 .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-pGA6WndbuaH9yKx1 .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-pGA6WndbuaH9yKx1 .marker{fill:#333}#mermaid-svg-pGA6WndbuaH9yKx1 .marker.cross{stroke:#333}:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}#mermaid-svg-pGA6WndbuaH9yKx1 {color: rgba(0, 0, 0, 0.75);font: ;}

RequestNavigate
OnNavigatedFrom
IsNavigationTarget
ResolveView
OnNavigatedTo
NavigateComplete

2.6 IConfirmNavigationRequest

该接口继承自INavigationAware,所以,它多了一个功能:允许用户针对导航请求进行拦截。同时也需要多实现一个方法:

        public void ConfirmNavigationRequest(NavigationContext navigationContext, Action<bool> continuationCallback){throw new NotImplementedException();}
    public void ConfirmNavigationRequest(NavigationContext navigationContext, Action<bool> continuationCallback){bool result = true;if (MessageBox.Show("Do you to navigate?", "Navigate?", MessageBoxButton.YesNo) == MessageBoxResult.No)result = false;//true则同意 false则拒绝continuationCallback(result);}

所以这个接口的执行流程为:

#mermaid-svg-47sFfJfivzqVZceD .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-47sFfJfivzqVZceD .label text{fill:#333}#mermaid-svg-47sFfJfivzqVZceD .node rect,#mermaid-svg-47sFfJfivzqVZceD .node circle,#mermaid-svg-47sFfJfivzqVZceD .node ellipse,#mermaid-svg-47sFfJfivzqVZceD .node polygon,#mermaid-svg-47sFfJfivzqVZceD .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-47sFfJfivzqVZceD .node .label{text-align:center;fill:#333}#mermaid-svg-47sFfJfivzqVZceD .node.clickable{cursor:pointer}#mermaid-svg-47sFfJfivzqVZceD .arrowheadPath{fill:#333}#mermaid-svg-47sFfJfivzqVZceD .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-47sFfJfivzqVZceD .flowchart-link{stroke:#333;fill:none}#mermaid-svg-47sFfJfivzqVZceD .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-47sFfJfivzqVZceD .edgeLabel rect{opacity:0.9}#mermaid-svg-47sFfJfivzqVZceD .edgeLabel span{color:#333}#mermaid-svg-47sFfJfivzqVZceD .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-47sFfJfivzqVZceD .cluster text{fill:#333}#mermaid-svg-47sFfJfivzqVZceD div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-47sFfJfivzqVZceD .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-47sFfJfivzqVZceD text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-47sFfJfivzqVZceD .actor-line{stroke:grey}#mermaid-svg-47sFfJfivzqVZceD .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-47sFfJfivzqVZceD .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-47sFfJfivzqVZceD #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-47sFfJfivzqVZceD .sequenceNumber{fill:#fff}#mermaid-svg-47sFfJfivzqVZceD #sequencenumber{fill:#333}#mermaid-svg-47sFfJfivzqVZceD #crosshead path{fill:#333;stroke:#333}#mermaid-svg-47sFfJfivzqVZceD .messageText{fill:#333;stroke:#333}#mermaid-svg-47sFfJfivzqVZceD .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-47sFfJfivzqVZceD .labelText,#mermaid-svg-47sFfJfivzqVZceD .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-47sFfJfivzqVZceD .loopText,#mermaid-svg-47sFfJfivzqVZceD .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-47sFfJfivzqVZceD .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-47sFfJfivzqVZceD .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-47sFfJfivzqVZceD .noteText,#mermaid-svg-47sFfJfivzqVZceD .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-47sFfJfivzqVZceD .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-47sFfJfivzqVZceD .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-47sFfJfivzqVZceD .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-47sFfJfivzqVZceD .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-47sFfJfivzqVZceD .section{stroke:none;opacity:0.2}#mermaid-svg-47sFfJfivzqVZceD .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-47sFfJfivzqVZceD .section2{fill:#fff400}#mermaid-svg-47sFfJfivzqVZceD .section1,#mermaid-svg-47sFfJfivzqVZceD .section3{fill:#fff;opacity:0.2}#mermaid-svg-47sFfJfivzqVZceD .sectionTitle0{fill:#333}#mermaid-svg-47sFfJfivzqVZceD .sectionTitle1{fill:#333}#mermaid-svg-47sFfJfivzqVZceD .sectionTitle2{fill:#333}#mermaid-svg-47sFfJfivzqVZceD .sectionTitle3{fill:#333}#mermaid-svg-47sFfJfivzqVZceD .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-47sFfJfivzqVZceD .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-47sFfJfivzqVZceD .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-47sFfJfivzqVZceD .grid path{stroke-width:0}#mermaid-svg-47sFfJfivzqVZceD .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-47sFfJfivzqVZceD .task{stroke-width:2}#mermaid-svg-47sFfJfivzqVZceD .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-47sFfJfivzqVZceD .taskText:not([font-size]){font-size:11px}#mermaid-svg-47sFfJfivzqVZceD .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-47sFfJfivzqVZceD .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-47sFfJfivzqVZceD .task.clickable{cursor:pointer}#mermaid-svg-47sFfJfivzqVZceD .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-47sFfJfivzqVZceD .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-47sFfJfivzqVZceD .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-47sFfJfivzqVZceD .taskText0,#mermaid-svg-47sFfJfivzqVZceD .taskText1,#mermaid-svg-47sFfJfivzqVZceD .taskText2,#mermaid-svg-47sFfJfivzqVZceD .taskText3{fill:#fff}#mermaid-svg-47sFfJfivzqVZceD .task0,#mermaid-svg-47sFfJfivzqVZceD .task1,#mermaid-svg-47sFfJfivzqVZceD .task2,#mermaid-svg-47sFfJfivzqVZceD .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-47sFfJfivzqVZceD .taskTextOutside0,#mermaid-svg-47sFfJfivzqVZceD .taskTextOutside2{fill:#000}#mermaid-svg-47sFfJfivzqVZceD .taskTextOutside1,#mermaid-svg-47sFfJfivzqVZceD .taskTextOutside3{fill:#000}#mermaid-svg-47sFfJfivzqVZceD .active0,#mermaid-svg-47sFfJfivzqVZceD .active1,#mermaid-svg-47sFfJfivzqVZceD .active2,#mermaid-svg-47sFfJfivzqVZceD .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-47sFfJfivzqVZceD .activeText0,#mermaid-svg-47sFfJfivzqVZceD .activeText1,#mermaid-svg-47sFfJfivzqVZceD .activeText2,#mermaid-svg-47sFfJfivzqVZceD .activeText3{fill:#000 !important}#mermaid-svg-47sFfJfivzqVZceD .done0,#mermaid-svg-47sFfJfivzqVZceD .done1,#mermaid-svg-47sFfJfivzqVZceD .done2,#mermaid-svg-47sFfJfivzqVZceD .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-47sFfJfivzqVZceD .doneText0,#mermaid-svg-47sFfJfivzqVZceD .doneText1,#mermaid-svg-47sFfJfivzqVZceD .doneText2,#mermaid-svg-47sFfJfivzqVZceD .doneText3{fill:#000 !important}#mermaid-svg-47sFfJfivzqVZceD .crit0,#mermaid-svg-47sFfJfivzqVZceD .crit1,#mermaid-svg-47sFfJfivzqVZceD .crit2,#mermaid-svg-47sFfJfivzqVZceD .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-47sFfJfivzqVZceD .activeCrit0,#mermaid-svg-47sFfJfivzqVZceD .activeCrit1,#mermaid-svg-47sFfJfivzqVZceD .activeCrit2,#mermaid-svg-47sFfJfivzqVZceD .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-47sFfJfivzqVZceD .doneCrit0,#mermaid-svg-47sFfJfivzqVZceD .doneCrit1,#mermaid-svg-47sFfJfivzqVZceD .doneCrit2,#mermaid-svg-47sFfJfivzqVZceD .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-47sFfJfivzqVZceD .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-47sFfJfivzqVZceD .milestoneText{font-style:italic}#mermaid-svg-47sFfJfivzqVZceD .doneCritText0,#mermaid-svg-47sFfJfivzqVZceD .doneCritText1,#mermaid-svg-47sFfJfivzqVZceD .doneCritText2,#mermaid-svg-47sFfJfivzqVZceD .doneCritText3{fill:#000 !important}#mermaid-svg-47sFfJfivzqVZceD .activeCritText0,#mermaid-svg-47sFfJfivzqVZceD .activeCritText1,#mermaid-svg-47sFfJfivzqVZceD .activeCritText2,#mermaid-svg-47sFfJfivzqVZceD .activeCritText3{fill:#000 !important}#mermaid-svg-47sFfJfivzqVZceD .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-47sFfJfivzqVZceD g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-47sFfJfivzqVZceD g.classGroup text .title{font-weight:bolder}#mermaid-svg-47sFfJfivzqVZceD g.clickable{cursor:pointer}#mermaid-svg-47sFfJfivzqVZceD g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-47sFfJfivzqVZceD g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-47sFfJfivzqVZceD .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-47sFfJfivzqVZceD .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-47sFfJfivzqVZceD .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-47sFfJfivzqVZceD .dashed-line{stroke-dasharray:3}#mermaid-svg-47sFfJfivzqVZceD #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-47sFfJfivzqVZceD #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-47sFfJfivzqVZceD #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-47sFfJfivzqVZceD #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-47sFfJfivzqVZceD #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-47sFfJfivzqVZceD #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-47sFfJfivzqVZceD #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-47sFfJfivzqVZceD #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-47sFfJfivzqVZceD .commit-id,#mermaid-svg-47sFfJfivzqVZceD .commit-msg,#mermaid-svg-47sFfJfivzqVZceD .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-47sFfJfivzqVZceD .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-47sFfJfivzqVZceD .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-47sFfJfivzqVZceD g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-47sFfJfivzqVZceD g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-47sFfJfivzqVZceD g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-47sFfJfivzqVZceD g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-47sFfJfivzqVZceD g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-47sFfJfivzqVZceD g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-47sFfJfivzqVZceD .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-47sFfJfivzqVZceD .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-47sFfJfivzqVZceD .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-47sFfJfivzqVZceD .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-47sFfJfivzqVZceD .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-47sFfJfivzqVZceD .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-47sFfJfivzqVZceD .edgeLabel text{fill:#333}#mermaid-svg-47sFfJfivzqVZceD .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-47sFfJfivzqVZceD .node circle.state-start{fill:black;stroke:black}#mermaid-svg-47sFfJfivzqVZceD .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-47sFfJfivzqVZceD #statediagram-barbEnd{fill:#9370db}#mermaid-svg-47sFfJfivzqVZceD .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-47sFfJfivzqVZceD .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-47sFfJfivzqVZceD .statediagram-state .divider{stroke:#9370db}#mermaid-svg-47sFfJfivzqVZceD .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-47sFfJfivzqVZceD .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-47sFfJfivzqVZceD .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-47sFfJfivzqVZceD .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-47sFfJfivzqVZceD .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-47sFfJfivzqVZceD .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-47sFfJfivzqVZceD .note-edge{stroke-dasharray:5}#mermaid-svg-47sFfJfivzqVZceD .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-47sFfJfivzqVZceD .error-icon{fill:#522}#mermaid-svg-47sFfJfivzqVZceD .error-text{fill:#522;stroke:#522}#mermaid-svg-47sFfJfivzqVZceD .edge-thickness-normal{stroke-width:2px}#mermaid-svg-47sFfJfivzqVZceD .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-47sFfJfivzqVZceD .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-47sFfJfivzqVZceD .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-47sFfJfivzqVZceD .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-47sFfJfivzqVZceD .marker{fill:#333}#mermaid-svg-47sFfJfivzqVZceD .marker.cross{stroke:#333}:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}#mermaid-svg-47sFfJfivzqVZceD {color: rgba(0, 0, 0, 0.75);font: ;}

RequestNavigate
ConfirmNavigationRequest
OnNavigatedFrom
ContinueNavigationProcess

2.7 IRegionNavigationJournal

导航日志,其实就是对导航系统的一个管理功能,理论上来说,我们应该知道我们上一步导航的位置、以及下一步导航的位置,包括我们导航的历史记录。以便于我们使用导航对应用程序可以灵活的控制。

IRegionNavigationJournal接口有如下功能:

  • GoBack() : 返回上一页
  • CanGoBack : 是否可以返回上一页
  • GoForward(): 返回后一页
  • CanGoForward : 是否可以返回后一页
        IRegionNavigationJournal _journal;public void OnNavigatedTo(NavigationContext navigationContext){_journal = navigationContext.NavigationService.Journal;}

我们可以在OnNavigatedTo函数中得到IRegionNavigationJournal的实现,然后就可以使用相应的方法。

三、InvokeCommandAction

直接由控件的事件触发,然后转化为Command。

   xmlns:i="http://schemas.microsoft.com/xaml/behaviors"<ListBox x:Name="_listOfPeople" ItemsSource="{Binding People}"><i:Interaction.Triggers><i:EventTrigger EventName="SelectionChanged"><prism:InvokeCommandAction Command="{Binding PersonSelectedCommand}" CommandParameter="{Binding SelectedItem, ElementName=_listOfPeople}" /></i:EventTrigger></i:Interaction.Triggers></ListBox>

上面的一种方式是传送一个其他的参数给命令。是否可以直接将事件参数传递给命令呢?

        xmlns:i="http://schemas.microsoft.com/xaml/behaviors"<ListBox Grid.Row="1" Margin="5" ItemsSource="{Binding Items}" SelectionMode="Single"><i:Interaction.Triggers><!-- This event trigger will execute the action when the corresponding event is raised by the ListBox. --><i:EventTrigger EventName="SelectionChanged"><!-- This action will invoke the selected command in the view model and pass the parameters of the event to it. --><prism:InvokeCommandAction Command="{Binding SelectedCommand}" TriggerParameterPath="AddedItems" /></i:EventTrigger></i:Interaction.Triggers></ListBox>
 public IList<string> Items { get; private set; }public DelegateCommand<object[]> SelectedCommand { get; private set; }public MainWindowViewModel(){Items = new List<string>();Items.Add("Item1");Items.Add("Item2");Items.Add("Item3");Items.Add("Item4");Items.Add("Item5");// This command will be executed when the selection of the ListBox in the view changes.SelectedCommand = new DelegateCommand<object[]>(OnItemSelected);}private void OnItemSelected(object[] selectedItems){if (selectedItems != null && selectedItems.Count() > 0){SelectedItemText = selectedItems.FirstOrDefault().ToString();}}

代码中Command的参数是object[]类型,我也不知道为什么。。。。请大佬告知!!!

WPF Prism(五)Navigation相关推荐

  1. WPF Prism框架

    Prism框架 1.关于Prism框架 ​ 官方地址:http://prismlibrary.com ​ 官方源码:https://github.com/PrismLibrary/Prism ​ 版本 ...

  2. WPF开发学生信息管理系统【WPF+Prism+MAH+WebApi】(一)

    最近通过WPF开发项目,为了对WPF知识点进行总结,所以利用业余时间,开发一个学生信息管理系统[Student Information Management System].本文主要简述如何通过WPF ...

  3. WPF基础五:UI④ 条目控件ContextMenu

    派生关系: Object->DispatcherObject->DependencyObject->Visual->UIElement->FrameworkElement ...

  4. WPF PRISM开发入门一( 初始化PRISM WPF程序)

    原文:WPF PRISM开发入门一( 初始化PRISM WPF程序) 这篇博客将介绍在WPF项目中引入PRISM框架进行开发的一些基础知识.目前最新的PRISM的版本是Prism 6.1.0,可以在G ...

  5. 怎样实现WPF Prism Module的国际化和本地化?

    English | 简体中文 上一篇有简单介绍主工程的国际化,使用的资源字典(XAML)实现的.这几天我添加了几个Prism模块(Module),发现子模块使用资源字典的方式实现国际化和本地化不好做, ...

  6. 【转】WPF PRISM开发入门一( 初始化PRISM WPF程序)

    这篇博客将介绍在WPF项目中引入PRISM框架进行开发的一些基础知识.目前最新的PRISM的版本是Prism 6.1.0,可以在Github上获取PRISM的源码.这个系列的博客将选择PRISM 4. ...

  7. WPF开发学生信息管理系统【WPF+Prism+MAH+WebApi】(完)

    最近通过WPF开发项目,为了对WPF知识点进行总结,所以利用业余时间,开发一个学生信息管理系统[Student Information Management System].前四篇文章进行了框架搭建和 ...

  8. WPF基础五:UI③带标题内容控件Expander

    HeaderedContentControl 为包含单项内容并具有标头的所有控件提供基实现. HeaderedContentControl 从 ContentControl 继承 Content 属性 ...

  9. wpf prism IRegionManager 和IRegionViewRegistry

    引入了一个新的问题,IRegionViewRegistry和IRegionManager都具有RegisterViewWithRegion方法,二者有区别么? 答案是--没有.我们已经分析过,在Uni ...

最新文章

  1. qt串口采用队列_基于STM32的RGB调色器——STM32程序和Qt上位机全开源
  2. 5月18发布会,这次TDSQL又有什么大动作?
  3. WPF实现统计图(饼图仿LiveCharts)
  4. mysql中pi是什么意思_MySQL 基础知识与常用命令
  5. axure 怎么看距离_AXURE 怎么获取当天日期,并计算该日期距离年底还有多少天?...
  6. php商品评价代码,php商品对比功能代码分享
  7. MFC 创建快捷方式(学习笔记)
  8. html 显示shp,cesium加载本地shp数据
  9. 【MATLAB教程案例11~20总结】优化类算法matlab仿真经验和技巧总结
  10. android设备连接打印机,【Android快讯】教你通过Android设备直接连接打印机打印文件...
  11. 积水识别 工地积水识别
  12. QQ分享功能实现-Android
  13. DART语言学习整理
  14. 常用adb命令 主要针对车机硬件类用的多
  15. MP3音频解码详细过程(二)
  16. Word里面最难删的东西,困扰了97.99%的职场人,实在是太烦人了
  17. 操作系统、计算机网络、数据库系统概论等相关面试问题
  18. 根据经纬度定位百度地图(带图片的)
  19. Aapache 启动不了,报错信息:suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
  20. 1024程序员节,我们组织了一场关于新体验、新技术的活动,11月

热门文章

  1. Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
  2. 未来蓝牙新方向之一【AoA室内定位】
  3. nz-select不能写在label标签里面
  4. Could not find artifact com.dingtalk.api:top-api-sdk-dev:pom:ding-open-mc-SNAPSHOT in aliyunmaven
  5. 星淘惠:做跨境电商为什么要选择亚马逊?
  6. DHT:分布式哈希表
  7. JS实现图片幻灯片效果
  8. 【lizhi125】各大搜索引擎网站提交入口
  9. 2009年A股各板块龙头股大全(转载)
  10. Jetson TX2 镜像拷贝和烧写