public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            Vm.Init();

            AddButton = new UIBarButtonItem(UIBarButtonSystemItem.Add);
            NavigationItem.SetRightBarButtonItem(AddButton, false);
            AddButton.Clicked += (sender, args) => { };

            // bindings
            AddButton.SetCommand("Clicked", Vm.AddPersonCommand);
            _currentIndexBinding = this.SetBinding(
                () => CurrentIndex,
                () => Vm.CurrentIndex);

            source = Vm.People.GetTableViewSource(
                CreateTaskCell,
                BindTaskCell,
                factory: () => new PeopleListObservableTableSource());

            PeopleTableView.Source    = source;
            PeopleTableView.Delegate  = this;
            PeopleTableView.RowHeight = 185;
            PeopleTableView.ReloadData();


            // Add Important Message View
            var importantMessage      = ImportantMessageView.Create();
            var importantMessageFrame = new CGRect(0, 0, View.Frame.Width, 50);

            importantMessage.Frame = importantMessageFrame;
            View.AddSubview(importantMessage);
        }
Пример #2
0
 public EditNoteView(string noteItemId)
 {
     InitializeComponent();
     Vm.Init(noteItemId);
     BindingContext = Vm;
     NavigationPage.SetBackButtonTitle(this, "Cancel");
 }
Пример #3
0
        public CardRecyclerAdapter(Activity context, ObservableCollection <Person> data)
        {
            _inflater = LayoutInflater.From(context);
            _data     = data;

            Vm.Init();
        }
Пример #4
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     Vm.Init();
     SetContentView(Resource.Layout.CardRecycler);
     SetUpRecycleView();
     SetActionBar(MainToolbar);
 }
Пример #5
0
        protected override async Task OnFirstAfterRenderAsync()
        {
            await Vm.Init();

            var jsonData = Vm.GetJesonDesignData();

            thisReference = DotNetObjectReference.Create(this);

            await JsInterop.InvokeAsync <object>("Orions.FlowDesigner.Init", new object[] { thisReference, jsonData });
        }
Пример #6
0
        protected override void OnStart()
        {
            base.OnStart();
            Vm.Init();

            // Bindings
            SetBindings();

            // Hide unwanted Fragment after successful binding
            OnlyDisplayWantedFragment();
        }
Пример #7
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);
            SetActionBar(PeopleToolbar);

            Vm.Init();
            PeopleListView.Adapter = Vm.People.GetAdapter(GetPersonView);
            //PeopleListView.SetCommand("ItemClick", Vm.AddPersonCommand);
            //PeopleToolbar.SetCommand("OptionsItemSelected", Vm.AddPersonCommand, "");

            PeopleListView.ItemClick += ListView_ItemClick;
        }
Пример #8
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            Vm.Init();

            // bindings
            _nameLabelBinding = this.SetBinding(
                () => Vm.CurrentPerson.Name,
                () => persName.Text);
            _viewModeBinding = this.SetBinding(
                () => Vm.CurrentViewMode,
                () => CurrentViewMode);
            editButton.SetCommand(Vm.EditTogglePersonCommand);
            deleteButton.SetCommand(Vm.RemovePersonCommand);

            SetupConatiner();
        }
Пример #9
0
 public DataSource(MasterViewController controller)
 {
     this.controller = controller;
     Vm.Init();
     Objects = Vm.People;
 }
 public override void ViewWillAppear(bool animated)
 {
     base.ViewWillAppear(animated);
     Vm.Init();
 }