本文整理汇总了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();
});
}
示例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();
}
示例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 }
};
}
示例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();
});
}