コード例 #1
0
        public Notification(ICommonBl bl, MainAdminViewModel mainAdminViewModel)
        {
            InitializeComponent();

            _bl = bl;
            _mainAdminViewModel = mainAdminViewModel;

            _viewModel = new NotificationViewModel(_bl, _mainAdminViewModel);
            App.AddViewModel("NotificationViewModel", _viewModel); 

            grdMain.DataContext = _viewModel;

        }
コード例 #2
0
        public void DoSendNotification()
        {
            NotificationViewModel viewModel = App.ViewModel["NotificationViewModel"] as NotificationViewModel;

            viewModel.SendNotification();
        }