Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check View type Xamarin Android

I have an View element and I want to check its type like ImageView, TextView etc in Android I could do this like (view instanceof EditText) but couldn't find anything familiar in Xamarin Android.

like image 827
Ali Zaidi Avatar asked Mar 09 '23 00:03

Ali Zaidi


1 Answers

 if (view.GetType() == typeof(EditText))
 {
     // Do stuff here
 }
like image 187
Stam Avatar answered Mar 20 '23 12:03

Stam