3
Reply

explanation about source code of combobox

abdelwaheb ammar

abdelwaheb ammar

Jan 19 2018 8:40 AM
178
I find this source code that allows me Binding ComboBox directly to enum values but I do not understand this instruction
  1. public IList<UserType> UserTypes  
  2. {  
  3.     get  
  4.     {  
  5.         // Will result in a list like {"Tester", "Engineer"}  
  6.         return Enum.GetValues(typeof(UserType)).Cast<UserType>().ToList<UserType>();  
  7.     }  
  8. }  
  9.    
  10. public UserType UserType  
  11. {  
  12.     get;  
  13.     set;  
  14. }  
 knowing that this code I find it in this site :http://www.ridgesolutions.ie/index.php/2014/11/05/wpf-xaml-binding-combobox-directly-to-enum-values/

Upload Source Code  Select only zip and rar file.
Answers (3)