CommandConverter.ConvertFrom Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mencoba mengonversi objek yang ditentukan menjadi ICommand, menggunakan konteks yang ditentukan.
public:
override System::Object ^ ConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ source);
public override object ConvertFrom (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object source);
override this.ConvertFrom : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj -> obj
Public Overrides Function ConvertFrom (context As ITypeDescriptorContext, culture As CultureInfo, source As Object) As Object
Parameter
- context
- ITypeDescriptorContext
Konteks format yang menyediakan informasi tentang lingkungan tempat konverter ini dipanggil.
- culture
- CultureInfo
Informasi khusus budaya.
- source
- Object
Objek yang akan dikonversi.
Mengembalikan
Objek yang dikonversi, atau null
jika source
adalah string kosong.
Pengecualian
source
tidak dapat dikonversi.
Keterangan
Kelas CommandConverter hanya mengonversi instans ke ICommand dan dari String. Selain itu, perintah harus merupakan perintah yang ada, atau harus ditetapkan ke properti statis publik atau bidang statis publik.