//custom methods---------------------------------------------------------------- void InitializeComponentsReorderableList() { _componentsListadapter = new ExternalReorderableListAdapter <EntryComponent>(EntryData.Componets); _componentsListadapter.CallBack_List_OnAddOptions += OnAdd; // _componentsListadapter.CallBack_List_OnInsert += OnInsert; _componentsListadapter.CallBack_List_OnRemove += OnRemove; _componentsListadapter.CallBack_List_OnDuplicate += OnDuplicate; _componentsListadapter.CallBack_Setting_OnSelect += OnSelect; _componentsListadapter.CallBack_Setting_OnChanged += OnReorder; _componentsListadapter.Callback_Draw_ElementHeight += OnGetItemHeight; _componentsListadapter.Callback_Draw_Element += ItemDrawer; _componentsListadapter.Callback_Draw_Header += DrawHeader; _componentsListadapter.CallBack_Setting_CanAdd += list => EntryData.ShowAddButton; _componentsListadapter.CallBack_Setting_CanRemove += (list, i) => EntryData.ShowRemoveButton; _componentsListadapter.CallBack_Setting_CanShowContextMenu += () => EntryData.ShowAddButton; _componentsListadapter.Property_Show_Dragable = EntryData.ShowDraggableButton; _componentsListadapter.Property_Show_Header = false; }
//------------------------------------------------------------------------------------------------------------- private void InitializeReorderableList() { _reorderableList = new ExternalReorderableListAdapter <EntryComponent>(Template.ObserversList); _reorderableList.CallBack_List_OnAdd += OnAddComponentClick; _reorderableList.CallBack_List_OnRemove += CallBackListOnRemove; _reorderableList.CallBack_List_OnDuplicate += CallBackListOnDuplicate; _reorderableList.Callback_Draw_Element += DrawElementCallback; _reorderableList.Callback_Draw_ElementHeight += ElementHeightCallback; _reorderableList.Callback_Draw_ElementBackground += DrawElementBackgroundCallback; _reorderableList.Callback_Draw_Header += DrawHeaderCallback; _reorderableList.Property_Show_RemoveButton = true; }