public MultiPicker(MultiPickerModel objModel)
        {
            InitializeComponent();

            LoadData(objModel);
            CloseWhenBackgroundIsClicked = false;
        }
        private List <string> GetAllCategory(MultiPickerModel objModel)
        {
            List <string> lstobjCategory = new List <string>();

            foreach (var item in objModel.DataModel.Select(m => m.category).Distinct())
            {
                lstobjCategory.Add(item);
            }
            return(lstobjCategory);
        }
 private void LoadData(MultiPickerModel objModel)
 {
     multiPickerModel             = objModel;
     lblHeader.Text               = objModel.Header;
     lblCategoryHeader.Text       = objModel.LblCategoryHeader;
     lblSubCategoryHeader.Text    = objModel.LblSubCategoryHeader;
     lstCategory.ItemsSource      = GetAllCategory(objModel);
     lstCategory.SelectedItem     = objModel.DataModel[0].category;
     lstCategory.ItemSelected    += LstCategory_ItemSelected;
     lstSubCategory.ItemsSource   = GetAllSubCategory(objModel.DataModel[0].category, objModel.DataModel);
     lstSubCategory.ItemSelected += LstSubCategory_ItemSelected;
     lstSubCategory.ItemSelected -= LstSubCategory_UnSelected;
 }