本文整理匯總了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);
}
}