Frame.NavigationService 속성

정의

NavigationService에서 탐색 서비스를 제공하는 데 사용되는 Frame를 가져옵니다.

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

속성 값

NavigationService

Frame에 사용되는 NavigationService가 있는 경우 이를 나타내는 Frame 개체입니다. 그렇지 않으면 null이 반환됩니다.

설명

Frame 사용 하 여 NavigationService 호스팅된 콘텐츠에 대 한 탐색을 지원 하도록 합니다. NavigationService 호스트 하는 코드에 유용를 Frame 을 참조 하는 NavigationService합니다. 호스트 되는 콘텐츠를 Frame와 같은 Page를 사용 해야 GetNavigationService 또는 NavigationService 에 대 한 참조를 가져오려면는 NavigationService합니다.

참고

NavigationService 동일한에 대 한 참조를 반환 하지 않습니다 NavigationService 호출할 때 GetNavigationService 전달과 Frame 않습니다. 첫 번째는 NavigationService 가 소유 하는 Frame 후자 반환 하는 동안는 NavigationService 는 콘텐츠를 탐색 하는 탐색 호스트는 Frame 호스팅됩니다. 다음 코드는 차이점을 보여 줍니다.

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)

적용 대상