示例#1
0
        public void CloseMe(object param)
        {
            GestioneContoCorrenteView MFMV = param as GestioneContoCorrenteView;
            DockPanel wp = MFMV.Parent as DockPanel;

            wp.Children.Remove(MFMV);
        }
        private void OpenContoCorrente(object param)
        {
            DockPanel mainGrid = param as DockPanel;

            if (gestioneContoCorrenteView == null || !mainGrid.Children.Contains(gestioneContoCorrenteView))
            {
                gestioneContoCorrenteViewModel = new GestioneContoCorrenteViewModel(_registryServices, _managerLiquidServices);
                gestioneContoCorrenteView      = new GestioneContoCorrenteView(gestioneContoCorrenteViewModel);
                mainGrid.Children.Add(gestioneContoCorrenteView);
            }
            else
            {
                mainGrid.Children.Remove(gestioneContoCorrenteView);
                gestioneContoCorrenteView      = null;
                gestioneContoCorrenteViewModel = null;
            }
        }