本文整理汇总了C#中Template10.Services.NavigationService.NavigatingEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# NavigatingEventArgs类的具体用法?C# NavigatingEventArgs怎么用?C# NavigatingEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NavigatingEventArgs类属于Template10.Services.NavigationService命名空间,在下文中一共展示了NavigatingEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnNavigatingFromAsync
public Task OnNavigatingFromAsync(NavigatingEventArgs args)
{
if (galleryMetaInfo == null)
BootStrapper.Current.SessionState["GalleryInfo"] = new GalleryMetaInfo { Gallery = Images, SelectedIndex = FlipViewIndex };
else
galleryMetaInfo.SelectedIndex = FlipViewIndex;
return Task.CompletedTask;
}
开发者ID:akshay2000,项目名称:MonocleGiraffe,代码行数:8,代码来源:BrowserPageViewModel.cs
示例2: OnNavigatingFrom
public override void OnNavigatingFrom(NavigatingEventArgs args)
{
try
{
ApplicationView view = ApplicationView.GetForCurrentView();
view.ExitFullScreenMode();
}
catch (Exception)
{
}
}
开发者ID:KhaledJemni,项目名称:UWP-App-Samples,代码行数:11,代码来源:HelpPageViewModel.cs
示例3: NavigatingFrom
// before navigate (cancellable)
bool NavigatingFrom(bool suspending)
{
var page = FrameFacade.Content as Page;
if (page != null)
{
var dataContext = page.DataContext as INavigable;
if (dataContext != null)
{
var args = new NavigatingEventArgs
{
PageType = FrameFacade.CurrentPageType,
Parameter = FrameFacade.CurrentPageParam,
Suspending = suspending,
};
dataContext.OnNavigatingFrom(args);
return !args.Cancel;
}
}
return true;
}
开发者ID:qmatteoq,项目名称:Template10,代码行数:21,代码来源:NavigationService.cs
示例4: FacadeNavigatingCancelEventHandler
private void FacadeNavigatingCancelEventHandler(object sender, NavigatingCancelEventArgs e)
{
DebugWrite();
object parameter = null;
try
{
parameter = SerializationService.Deserialize(e.Parameter?.ToString());
}
catch (Exception ex)
{
throw new Exception("Your parameter must be serializable. If it isn't, then use SessionState.", ex);
}
var args = new NavigatingEventArgs(e, Content as Page, parameter);
if (NavigationModeHint != NavigationMode.New)
args.NavigationMode = NavigationModeHint;
NavigationModeHint = NavigationMode.New;
foreach (var handler in _navigatingEventHandlers)
{
handler(this, args);
}
e.Cancel = args.Cancel;
}
开发者ID:DanTheManSWE,项目名称:Template10,代码行数:23,代码来源:FrameFacade.cs
示例5: FacadeNavigatingCancelEventHandler
private void FacadeNavigatingCancelEventHandler(object sender, NavigatingCancelEventArgs e)
{
DebugWrite();
var parameter = SerializationService.Deserialize(e.Parameter?.ToString());
var args = new NavigatingEventArgs(e, Content as Page, parameter);
if (NavigationModeHint != NavigationMode.New)
args.NavigationMode = NavigationModeHint;
NavigationModeHint = NavigationMode.New;
foreach (var handler in _navigatingEventHandlers)
{
handler(this, args);
}
e.Cancel = args.Cancel;
}
开发者ID:crazycreak,项目名称:Template10,代码行数:15,代码来源:FrameFacade.cs
示例6: OnNavigatingFromAsync
public override async Task OnNavigatingFromAsync(NavigatingEventArgs args)
{
await base.OnNavigatingFromAsync(args);
}
开发者ID:RareNCool,项目名称:Renttracker,代码行数:6,代码来源:MapPageViewModel.cs
示例7: OnNavigatingFrom
public override void OnNavigatingFrom(NavigatingEventArgs args)
{
args.Cancel = false;
}
开发者ID:DarthPedro,项目名称:Template10,代码行数:4,代码来源:DetailPageViewModel.cs
示例8: OnNavigatingFromAsync
public override Task OnNavigatingFromAsync(NavigatingEventArgs args)
{
args.Cancel = false;
return Task.CompletedTask;
}
开发者ID:crazycreak,项目名称:Template10,代码行数:5,代码来源:DetailPageViewModel.cs
示例9: OnNavigatingFromAsync
public override async Task OnNavigatingFromAsync(NavigatingEventArgs args)
{
args.Cancel = false;
await Task.CompletedTask;
}
开发者ID:C9Kamis,项目名称:PoGo-UWP,代码行数:5,代码来源:GameMapPageViewModel.cs
示例10: OnNavigatingFromAsync
public override Task OnNavigatingFromAsync(NavigatingEventArgs args)
{
return base.OnNavigatingFromAsync(args);
}
开发者ID:Bernie-2016,项目名称:Connect-Windows,代码行数:4,代码来源:ActionsViewModel.cs
示例11: FacadeNavigatingCancelEventHandler
private void FacadeNavigatingCancelEventHandler(object sender, NavigatingCancelEventArgs e)
{
var args = new NavigatingEventArgs(e, Content as Page);
if (NavigationModeHint != NavigationMode.New)
args.NavigationMode = NavigationModeHint;
NavigationModeHint = NavigationMode.New;
foreach (var handler in _navigatingEventHandlers)
{
handler(this, args);
}
e.Cancel = args.Cancel;
}
开发者ID:DarthPedro,项目名称:Template10,代码行数:12,代码来源:FrameFacade.cs
示例12: OnNavigatingFrom
public override async void OnNavigatingFrom(NavigatingEventArgs args)
{
await ExecuteSaveCommand();
}
开发者ID:Himansh1306,项目名称:Template10,代码行数:4,代码来源:MainPageViewModel.cs
示例13: OnNavigatingFromAsync
public override Task OnNavigatingFromAsync(NavigatingEventArgs args)
{
_dispatcherTimer.Stop();
return Task.CompletedTask;
}
开发者ID:gk-8,项目名称:Beacon-Insights,代码行数:5,代码来源:RadarPageViewModel.cs
示例14: NavingFromCancelsAsync
public async Task<bool> NavingFromCancelsAsync(object viewmodel, NavigationMode mode, Page sourcePage, Type sourceType, object sourceParameter, Page targetPage, Type targetType, object targetParameter, bool suspending)
{
Services.NavigationService.NavigationService.DebugWrite();
if (sourcePage == null)
{
return false;
}
else if (viewmodel == null)
{
return false;
}
else if (viewmodel is Classic.INavigatingAwareAsync)
{
var deferral = new DeferralManager();
var navigatingEventArgs = new Classic.NavigatingEventArgs(deferral)
{
Page = sourcePage,
PageType = sourcePage?.GetType(),
Parameter = sourceParameter,
NavigationMode = mode,
TargetPageType = targetType,
TargetPageParameter = targetParameter,
Suspending = suspending,
};
try
{
var vm = viewmodel as Classic.INavigatingAwareAsync;
await vm?.OnNavigatingFromAsync(navigatingEventArgs);
await deferral.WaitForDeferralsAsync();
}
catch
{
Debugger.Break();
}
return navigatingEventArgs.Cancel;
}
else if (viewmodel is Portable.IConfirmNavigationAsync)
{
var parameters = new Portable.NavigationParameters();
parameters.Add("NavigationMode", mode.ToPrismNavigationMode());
parameters.Add("SourceType", sourceType);
parameters.Add("SourceParameter", sourceParameter);
parameters.Add("TargetType", targetType);
parameters.Add("TargetParameter", targetParameter);
parameters.Add("Suspending", suspending);
var vm = viewmodel as Portable.IConfirmNavigationAsync;
return !await vm?.CanNavigateAsync(parameters);
}
else
{
return true;
}
}
开发者ID:GFlisch,项目名称:Template10,代码行数:54,代码来源:NavigationLogic.cs
示例15: OnNavigatingFromAsync
public override Task OnNavigatingFromAsync(NavigatingEventArgs args)
{
_beaconManagementService.StopAdvertising();
return base.OnNavigatingFromAsync(args);
}
开发者ID:gk-8,项目名称:Beacon-Insights,代码行数:5,代码来源:AdvertisingPageViewModel.cs
示例16: OnNavigatingFromAsync
public override async Task OnNavigatingFromAsync(NavigatingEventArgs args)
{
//args.Parameter = Recipe;
//args.Cancel = false;
SessionState.Add("UpdatedRecipe", Recipe);
await Task.CompletedTask;
}
开发者ID:CADTraveller,项目名称:RecipeMaster,代码行数:7,代码来源:DetailPageViewModel.cs
示例17: OnNavigatingFrom
public virtual void OnNavigatingFrom(NavigatingEventArgs args) { /* nothing by default */ }
开发者ID:ShiroYacha,项目名称:Planact,代码行数:1,代码来源:NavigableViewModelBase.cs
示例18: OnNavigatingFrom
public override void OnNavigatingFrom(NavigatingEventArgs args) {
mediaElement.Source = null;
base.OnNavigatingFrom(args);
}
开发者ID:francis23,项目名称:CamAndPlay,代码行数:5,代码来源:VidAndPlayViewModel.cs
示例19: FacadeNavigatingCancelEventHandler
private void FacadeNavigatingCancelEventHandler(object sender, NavigatingCancelEventArgs e)
{
var args = new NavigatingEventArgs(e);
foreach (var handler in _navigatingEventHandlers)
{
handler(this, args);
}
e.Cancel = args.Cancel;
}
开发者ID:ruisebastiao,项目名称:Template10,代码行数:9,代码来源:FrameFacade.cs
示例20: OnNavigatingFromAsync
public override async Task OnNavigatingFromAsync(NavigatingEventArgs args)
{
args.Cancel = false;
// Stops map timer
GameClient.ToggleUpdateTimer(false);
GameClient.MapPokemonUpdated -= GameClientOnMapPokemonUpdated;
await Task.CompletedTask;
}
开发者ID:Zampeta1,项目名称:PoGo-UWP,代码行数:8,代码来源:GameMapPageViewModel.cs
注:本文中的Template10.Services.NavigationService.NavigatingEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论