Bagikan melalui


NavigationCommands.Refresh Properti

Definisi

Mendapatkan nilai yang mewakili Refresh perintah .

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

Nilai Properti

Perintah UI yang dirutekan.

Nilai Default
Gerakan Kunci F5
Teks UI Refresh

Contoh

Contoh berikut menunjukkan cara menggunakan Refresh bersama dengan Frame. Frame menyediakan implementasi yang merespons Refresh perintah dengan memuat ulang konten saat iniFrame.

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<!-- NavigationCommands.Refresh -->
<MenuItem
  Command="NavigationCommands.Refresh"
  CommandTarget="{Binding ElementName=frame}" />
<!-- The following Frame is used to process NavigationCommands.Refresh commands -->
<Frame Name="frame" NavigationUIVisibility="Hidden" Source="Page1.xaml" />
</Window>

Keterangan

Perintah ini menunjukkan niat untuk menyegarkan halaman saat ini.

Frame dan NavigationWindow menerapkan dukungan untuk menanggapi Refresh perintah, meskipun Anda tidak diharuskan menggunakannya; dalam banyak kasus implementasi sebagai respons terhadap perintah itu adalah tanggung jawab penulis aplikasi.

Penggunaan Atribut XAML

<object property="NavigationCommands.Refresh"/>

Berlaku untuk

Lihat juga