I find this source code that allows me Binding ComboBox directly to enum values but I do not understand this instruction
- public IList<UserType> UserTypes
- {
- get
- {
-
- return Enum.GetValues(typeof(UserType)).Cast<UserType>().ToList<UserType>();
- }
- }
-
- public UserType UserType
- {
- get;
- set;
- }
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/