Frame.NavigationService Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
NavigationService Gezinti hizmetleri sağlamak için bu Frame tarafından kullanılan öğesini alır.
public:
property System::Windows::Navigation::NavigationService ^ NavigationService { System::Windows::Navigation::NavigationService ^ get(); };
public System.Windows.Navigation.NavigationService NavigationService { get; }
member this.NavigationService : System.Windows.Navigation.NavigationService
Public ReadOnly Property NavigationService As NavigationService
Özellik Değeri
Frame Varsa, tarafından NavigationServicekullanılan öğesini temsil eden Frame bir nesne. Aksi takdirde, null geri gönderilir.
Açıklamalar
Frame barındırılan içerik için gezintiyi desteklemek için kullanır NavigationService . NavigationService , öğesine başvuru almak için öğesini Frame barındıran kod için NavigationServicekullanışlıdır. gibi bir Frametarafından barındırılan içerik, öğesine başvuru Pagealmak için veya GetNavigationService kullanmalıdırNavigationService.NavigationService
Note
NavigationServiceçağrısı NavigationService ve geçirme GetNavigationService işlemiyle aynı Frame başvuru döndürmez. İlki, öğesinin sahip NavigationService olduğu öğesini döndürürkenFrame, ikincisi barındırıldığı içeriğe gidilen gezinti konağı için öğesini NavigationService döndürürFrame. Aşağıdaki kod farkları gösterir.
using System.Windows.Controls;
using System.Windows.Navigation;
Imports System.Windows.Controls
Imports System.Windows.Navigation
// Get the NavigationService owned by the Frame
NavigationService frameNS = this.frame.NavigationService;
// Get the NavigationService for the navigation host that navigated
// to the content in which the Frame is hosted
NavigationService navigationHostNS = NavigationService.GetNavigationService(this.frame);
' Get the NavigationService owned by the Frame
Dim frameNS As NavigationService = Me.frame.NavigationService
' Get the NavigationService for the navigation host that navigated
' to the content in which the Frame is hosted
Dim navigationHostNS As NavigationService = NavigationService.GetNavigationService(Me.frame)