Esempio n. 1
0
        void FnClickEvents()
        {
            //Listening to child item selection
            string result = String.Empty;

            expListView.ChildClick += delegate(object sender, ExpandableListView.ChildClickEventArgs e) {
                ViewModel.PierLocation = listAdapter.GetChild(e.GroupPosition, e.ChildPosition).ToString();
                ViewModel.ShowPierScanCommand.Execute();
            };

            //Listening to group expand
            //modified so that on selection of one group other opened group has been closed
            expListView.GroupExpand += delegate(object sender, ExpandableListView.GroupExpandEventArgs e) {
                if (e.GroupPosition != previousGroup)
                {
                    expListView.CollapseGroup(previousGroup);
                }
                previousGroup = e.GroupPosition;
            };

            //Listening to group collapse
            expListView.GroupCollapse += delegate(object sender, ExpandableListView.GroupCollapseEventArgs e) {
                //Toast.MakeText(this, "group collapsed", ToastLength.Short).Show();
            };
        }
Esempio n. 2
0
        void FnClickEvents()
        {
            string result = String.Empty;

            expListView.ChildClick += delegate(object sender, ExpandableListView.ChildClickEventArgs e) {
                ViewModel.PierLocation = listAdapter.GetChild(e.GroupPosition, e.ChildPosition).ToString();
                ViewModel.ShowPierScanCommand.Execute();
            };

            expListView.GroupExpand += delegate(object sender, ExpandableListView.GroupExpandEventArgs e) {
                if (e.GroupPosition != previousGroup)
                {
                    expListView.CollapseGroup(previousGroup);
                }
                previousGroup = e.GroupPosition;
            };

            expListView.GroupCollapse += delegate(object sender, ExpandableListView.GroupCollapseEventArgs e) {
            };
        }