/// <summary>
 /// Initializes a new instance of the <see cref="MonitorCloudView"/> class.
 /// </summary>
 public MonitorCloudView()
 {
     InitializeComponent();
     Vm.PropertyChanged += (s, e) => {
         var tableView = GrdDisco.View as TableView;
         if (tableView != null)
         {
             tableView.BestFitColumns();
         }
         GrdDisco.ExpandAllGroups();
     };
     Loaded += (s, e) => Vm.Initialize();
 }
示例#2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            Vm.Initialize();

            AddTaskButton = new UIBarButtonItem(UIBarButtonSystemItem.Add);
            this.NavigationItem.SetLeftBarButtonItem(AddTaskButton, false);

            //note this was needed when deploying to a real iPhone but worked
            //on the simulator without it. The Argument Exception Event not found clicked was thrown
            AddTaskButton.Clicked += (sender, e) => {};

            AddTaskButton.SetCommand("Clicked", Vm.AddTaskCommand);

            tableViewController           = Vm.TodoTasks.GetTaskListController(CreateTaskCell, BindTaskCell);
            tableViewController.TableView = TasksTableView;
        }