コード例 #1
0
        public EditNotePage(Guid noteId)
        {
            InitializeComponent();

            _noteId        = noteId;
            BindingContext = _viewModel = new EditNotePageViewModel();
        }
コード例 #2
0
        //  public NotesModel Note { get; set; }

        public EditNotePage(NotesModel notesModel)
        {
            InitializeComponent();

            BindingContext = viewModel = new EditNotePageViewModel(notesModel);

            viewModel.Initilize(notesModel);
        }
コード例 #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            ActivateActionBar();
            SetContentView(Resource.Layout.EditNote);

            _viewModel = new EditNotePageViewModel(new TestNotesManager());

            string noteGuid = Intent.GetStringExtra("NoteGUID");

            _viewModel.LoadData(!string.IsNullOrEmpty(noteGuid) ? Guid.Parse(noteGuid) : (Guid?)null);

            if (!string.IsNullOrEmpty(noteGuid))
            {
                DisplayDataInView();
            }
            else
            {
                ActionBar.SetTitle(Resource.String.NewNoteActionBarTitle);
            }
        }
コード例 #4
0
 public EditNotePage(Course course)
 {
     InitializeComponent();
     _note          = course.Notes;
     BindingContext = viewModel = new EditNotePageViewModel(course);
 }