다음을 통해 공유


NavigationCommands.BrowseHome 속성

정의

Browse Home 명령을 나타내는 값을 가져옵니다.

public:
 static property System::Windows::Input::RoutedUICommand ^ BrowseHome { System::Windows::Input::RoutedUICommand ^ get(); };
public static System.Windows.Input.RoutedUICommand BrowseHome { get; }
static member BrowseHome : System.Windows.Input.RoutedUICommand
Public Shared ReadOnly Property BrowseHome As RoutedUICommand

속성 값

라우트된 UI 명령입니다.

기본값
키 제스처 Alt+Home
UI 텍스트

예제

다음 예제에서는 응답 하는 코드를 구현 하는 방법을 보여 줍니다 합니다 BrowseHome 와 함께에서 명령을 Frame합니다.

<Window
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  x:Class="SDKSample.BrowseHome">
<!-- NavigationCommands.BrowseHome -->
<MenuItem Command="NavigationCommands.BrowseHome">
  <MenuItem.CommandBindings>
    <!-- NavigationCommands.BrowseHome Binding-->
    <CommandBinding
      Command="NavigationCommands.BrowseHome"
      CanExecute="navigationCommandBrowseHome_CanExecute"
      Executed="navigationCommandBrowseHome_Executed" />
  </MenuItem.CommandBindings>
</MenuItem>
<Frame Name="frame" NavigationUIVisibility="Hidden" Source="Page1.xaml" />
</Window>
using System.Windows;
using System.Windows.Input;

namespace SDKSample
{
    public partial class BrowseHome : Window
    {
        public BrowseHome()
        {
            InitializeComponent();
        }

        void navigationCommandBrowseHome_CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            // Can always navigate home
            e.CanExecute = true;
        }

        void navigationCommandBrowseHome_Executed(object target, ExecutedRoutedEventArgs e)
        {
            // Implement custom BrowseHome handling code
        }
    }
}

Namespace SDKSample
    Partial Public Class BrowseHome
        Inherits Window
        Public Sub New()
            InitializeComponent()
        End Sub

        Private Sub navigationCommandBrowseHome_CanExecute(ByVal sender As Object, ByVal e As CanExecuteRoutedEventArgs)
            ' Can always navigate home
            e.CanExecute = True
        End Sub

        Private Sub navigationCommandBrowseHome_Executed(ByVal target As Object, ByVal e As ExecutedRoutedEventArgs)
            ' Implement custom BrowseHome handling code
        End Sub
    End Class
End Namespace

설명

이 명령은 홈 탐색 하려고 함을 나타냅니다.

지정된 WPF 클래스의 BrowseHome 명령에 응답하기 위한 구현은 없습니다. 따라서이 예제에 나와 있는 적절 한 구현을 제공 해야 합니다.

XAML 특성 사용

<object property="NavigationCommands.BrowseHome"/>  

적용 대상

추가 정보