NavigationCommands.BrowseHome Ö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.
Komutu temsil Browse Home
eden değeri alır.
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
Özellik Değeri
Yönlendirilen UI komutu.
Varsayılan Değerler | |
---|---|
Anahtar Hareketi | ALT+HOME |
Kullanıcı Arabirimi Metni | Giriş Sayfası |
Örnekler
Aşağıdaki örnekte komutuna bir ile Framebirlikte yanıt veren kodun BrowseHome nasıl uygulandığı gösterilmektedir.
<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
Açıklamalar
Bu komut, giriş sayfasına gitme amacını gösterir.
Herhangi bir WPF sınıfında komutuna yanıt vermek BrowseHome için bir uygulama yoktur. Bu nedenle, örnekte gösterilen uygun bir uygulama sağlamanız gerekir.
XAML Öznitelik Kullanımı
<object property="NavigationCommands.BrowseHome"/>
Şunlara uygulanır
Ayrıca bkz.
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin