コード例 #1
0
        public MonsterDeletePage(MonsterDetailViewModel viewModel)
        {
            // Save the item
            Data            = viewModel.Data;
            viewModel.Title = "Delete " + viewModel.Data.Name;

            InitializeComponent();

            // Set the data binding for the page
            BindingContext = _viewModel = viewModel;
        }
コード例 #2
0
        public MonsterEditPage(MonsterDetailViewModel viewModel)
        {
            // Save off the item
            Data = viewModel.Data;
            // Items = Services.MockDataStore.Instance.GetItemList();


            viewModel.Title = "Edit " + viewModel.Title;

            InitializeComponent();


            // Set the data binding for the page
            BindingContext = _viewModel = viewModel;
        }
コード例 #3
0
        // Constructor
        public MonsterDetailPage()
        {
            InitializeComponent();

            var data = new WDown.Models.Monster
            {
                // Default values
                Name        = "Monster Unknown",
                Description = "This is a monster description.",
                Level       = 1
            };

            _viewModel     = new MonsterDetailViewModel(data);
            BindingContext = _viewModel;
        }