예제 #1
0
        public void Init()
        {
            if (Device.OS == TargetPlatform.iOS) {
                var list = new EditableListView<Object> ();
                list.SetBinding (EditableListView<Object>.SourceProperty, "JellyBeanValues");
                list.ViewType = typeof(JellyBeanListViewCell);
                list.CellHeight = 60;
                list.AddRowCommand = new Command (() => {
                    this.DisplayAlert ("Sorry", "Not implemented yet!", "OK");
                });

                if (PageModel.JellyBeanValues != null)
                    list.Source = PageModel.JellyBeanValues;
                Content = list;
            } else {
                var list = new ListView();
                list.SetBinding (ListView.ItemsSourceProperty, "JellyBeanValues");
                var celltemp = new DataTemplate(typeof(TextCell));
                celltemp.SetBinding (TextCell.TextProperty, "Name");
                celltemp.SetBinding (TextCell.DetailProperty, "ReadableValues");
                list.ItemTemplate = celltemp;
                if (PageModel.JellyBeanValues != null)
                    list.ItemsSource = PageModel.JellyBeanValues;
                Content = list;
            }

            ToolbarItems.Add(new ToolbarItem("Add", "", () => {
                this.DisplayAlert("Sorry", "Not implemented yet!", "OK");
            }));
        }
예제 #2
0
 public void Init()
 {
     var list = new EditableListView<Object> ();
     list.SetBinding (ListView.ItemsSourceProperty, "JellyBeanGraphData");
     list.ViewType = typeof(ManageGraphCustomView);
     if (PageModel.JellyBeanGraphData != null)
         list.Source = PageModel.JellyBeanGraphData;
     Content = list;
 }
예제 #3
0
        public void Init()
        {
            var list = new EditableListView <Object> ();

            list.SetBinding(ListView.ItemsSourceProperty, "JellyBeanGraphData");
            list.ViewType = typeof(ManageGraphCustomView);
            if (PageModel.JellyBeanGraphData != null)
            {
                list.Source = PageModel.JellyBeanGraphData;
            }
            Content = list;
        }
예제 #4
0
        public void Init()
        {
            if (Device.OS == TargetPlatform.iOS)
            {
                var list = new EditableListView <Object> ();
                list.SetBinding(EditableListView <Object> .SourceProperty, "JellyBeanValues");
                list.ViewType      = typeof(JellyBeanListViewCell);
                list.CellHeight    = 60;
                list.AddRowCommand = new Command(() => {
                    this.DisplayAlert("Sorry", "Not implemented yet!", "OK");
                });

                if (PageModel.JellyBeanValues != null)
                {
                    list.Source = PageModel.JellyBeanValues;
                }
                Content = list;
            }
            else
            {
                var list = new ListView();
                list.SetBinding(ListView.ItemsSourceProperty, "JellyBeanValues");
                var celltemp = new DataTemplate(typeof(TextCell));
                celltemp.SetBinding(TextCell.TextProperty, "Name");
                celltemp.SetBinding(TextCell.DetailProperty, "ReadableValues");
                list.ItemTemplate = celltemp;
                if (PageModel.JellyBeanValues != null)
                {
                    list.ItemsSource = PageModel.JellyBeanValues;
                }
                Content = list;
            }

            ToolbarItems.Add(new ToolbarItem("Add", "", () => {
                this.DisplayAlert("Sorry", "Not implemented yet!", "OK");
            }));
        }