本文整理汇总了C#中Xamarin.Forms.Page.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# Page.GetType方法的具体用法?C# Page.GetType怎么用?C# Page.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Xamarin.Forms.Page
的用法示例。
在下文中一共展示了Page.GetType方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadResourceText
string LoadResourceText(Page demoPage, string prefix, string suffix) {
string className = demoPage.GetType().Name;
Assembly asm = demoPage.GetType().GetTypeInfo().Assembly;
return LoadResourceText(prefix + className + suffix, asm);
}
示例2: IsModal
private bool IsModal(Page page)
{
return IsModal(page.GetType());
}
示例3: IsSameAsCurrentPage
private bool IsSameAsCurrentPage (Page page)
{
return (this.navigationPage.CurrentPage != null) && (this.navigationPage.CurrentPage.GetType () == page.GetType ());
}
示例4: PagePushed
protected void PagePushed(Page page)
{
Debug.WriteLine("PagePushed: Page={0}", page.GetType().Name);
var navigationAware = helper.AsNavigationAware(page);
if (navigationAware != null)
{
//
navigationAware.PagePushed(page as IPage);
}
}
示例5: OnNavigatingFrom
protected void OnNavigatingFrom(Page targetView, Page nextView)
{
Debug.WriteLine("OnNavigatingFrom: targetView={0}, previousView={1}", targetView.GetType().Name, nextView.GetType().Name);
// var navigationAware = helper.AsNavigationAware(targetView);
//
// if (navigationAware != null)
// {
// //
// navigationAware.OnNavigatingFrom(nextView as IPage);
// }
// modified 3-3-2015
var navigationAware = helper.AsNavigationAware(nextView);
if (navigationAware != null)
{
//
navigationAware.OnNavigatingFrom(targetView as IPage);
}
}
示例6: OnNavigatingTo
protected void OnNavigatingTo(Page targetView, Page previousView)
{
Debug.WriteLine("OnNavigatingTo: targetView={0}, nextView={1}", targetView.GetType().Name, previousView != null ? previousView.GetType().Name : string.Empty);
var navigationAware = helper.AsNavigationAware(targetView);
if (navigationAware != null)
{
// To page!
navigationAware.OnNavigatingTo(targetView as IPage);
}
}
示例7: OnNavigatingFrom
/// <summary>
/// Called when [navigating from].
/// </summary>
/// <param name="targetView">The target view.</param>
/// <param name="nextView">The next view.</param>
protected void OnNavigatingFrom(Page targetView, Page nextView)
{
Debug.WriteLine("OnNavigatingFrom: targetView={0}, previousView={1}", targetView.GetType().Name, nextView.GetType().Name);
var navigationAware = AsNavigationAware(targetView);
if (navigationAware != null)
{
navigationAware.OnNavigatingFrom(nextView);
}
}