当前位置: 首页>>代码示例>>C#>>正文


C# INavigationService.For方法代码示例

本文整理汇总了C#中INavigationService.For方法的典型用法代码示例。如果您正苦于以下问题:C# INavigationService.For方法的具体用法?C# INavigationService.For怎么用?C# INavigationService.For使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在INavigationService的用法示例。


在下文中一共展示了INavigationService.For方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MyViewModel

        public MyViewModel(INavigationService ns) {
            this.LoginCmd = new Command(() => {
                ns.For<LoginViewModel>()
                .Navigate();
            });

            this.ViewResumeCmd = new Command(() => {
                ns.For<ResumeViewModel>()
                .Navigate();
            });
        }
开发者ID:zhangcj,项目名称:Xamarin.Forms.Lagou,代码行数:11,代码来源:MyViewModel.cs

示例2: SetupNavigationService

        public void SetupNavigationService(Frame frame)
        {
            _navigationService = _container.RegisterNavigationService(frame);

            var navigationManager = SystemNavigationManager.GetForCurrentView();
            navigationManager.BackRequested += (a, b) => { if (_navigationService.CanGoBack) _navigationService.GoBack(); };
            _navigationService.Navigated += _navigationService_Navigated;

            _navigationService.For<GraphsViewModel>().Navigate();
        }
开发者ID:GreatChieftain,项目名称:Graph-Helper,代码行数:10,代码来源:ShellViewModel.cs

示例3: MyViewModel

        public MyViewModel(INavigationService ns) {
            this.LoginCmd = new Command(() => {
                ns.For<LoginViewModel>()
                .Navigate();
            });

            this.ViewResumeCmd = new Command(() => {
                ns.For<ResumeViewModel>()
                .Navigate();
            });

            this.Datas = new List<Tmp>() {
                new Tmp() {Text = "我的投递", Glyph = (char)0xf21c },
                new Tmp() {Text = "我的面试", Glyph = (char)0xf0c0 },
                new Tmp() {Text = "我的邀约", Glyph = (char)0xf095 },
                new Tmp() {Text = "我的收藏", Glyph = (char)0xf004 },
                new Tmp() {Text = "我的简历", Glyph = (char)0xf1c2, Cmd= this.ViewResumeCmd }
            };
        }
开发者ID:gruan01,项目名称:Lagou.UWP,代码行数:19,代码来源:MyViewModel.cs

示例4: SettingViewModel

        public SettingViewModel(INavigationService ns) {
            this.DisplayName = "设置";
            this.CacheSize = "未计算";

            this.Storage = DependencyService.Get<IStorage>();

            this.EditFavoriteCmd = new Command(() => {
                ns.For<FavoriteViewModel>()
                    .Navigate();
            });

            this.ClearCacheCmd = new Command(async () => {
                await this.Storage.Clear(ImageLoaderCachePath);
            });

            this.CalcCacheSizeCmd = new Command(async () => {
                await this.CalcCacheSize();
            });
        }
开发者ID:gruan01,项目名称:Discuz.Mobi,代码行数:19,代码来源:SettingViewModel.cs


注:本文中的INavigationService.For方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。