ContentControl.OnContentChanged(Object, Object) Metode

Definisi

Dipanggil saat nilai properti Konten berubah.

protected:
 virtual void OnContentChanged(Platform::Object ^ oldContent, Platform::Object ^ newContent) = OnContentChanged;
void OnContentChanged(IInspectable const& oldContent, IInspectable const& newContent);
protected virtual void OnContentChanged(object oldContent, object newContent);
function onContentChanged(oldContent, newContent)
Protected Overridable Sub OnContentChanged (oldContent As Object, newContent As Object)

Parameter

oldContent
Object

Platform::Object

IInspectable

Nilai lama properti Konten .

newContent
Object

Platform::Object

IInspectable

Nilai baru properti Konten .

Keterangan

Jika nilai untuk ContentTemplateSelector ada, implementasi default memanggil SelectTemplate pada DataTemplateSelector yang diimplementasikan, meneruskan nilai newContent sebagai item, dan memanggil ContentControl sebagai kontainer. Nilai yang dikembalikan kemudian mengatur ContentTemplate secara otomatis pada pemanggil.

Berlaku untuk