Waf.InformationManager.AddressBook.Modules.Applications.Controllers.ContactController.Initialize C# (CSharp) Method

Initialize() public method

public Initialize ( ) : void
return void
        public void Initialize()
        {
            ContactListViewModel.Contacts = Root.Contacts;
            ContactListViewModel.DeleteContactCommand = DeleteContactCommand;

            PropertyChangedEventManager.AddHandler(ContactListViewModel, ContactListViewModelPropertyChanged, "");

            contactLayoutViewModel.ContactListView = ContactListViewModel.View;
            contactLayoutViewModel.ContactView = ContactViewModel.View;
        }

Usage Example

Example #1
0
        private void ShowAddressBook()
        {
            activeContactController      = contactControllerFactory.CreateExport().Value;
            activeContactController.Root = root;
            activeContactController.Initialize();
            activeContactController.Run();

            var uiNewContactCommand = new ToolBarCommand(activeContactController.NewContactCommand, "_New contact", "Creates a new contact.");
            var uiDeleteCommand     = new ToolBarCommand(activeContactController.DeleteContactCommand, "_Delete", "Deletes the selected contact.");

            shellService.AddToolBarCommands(new[] { uiNewContactCommand, uiDeleteCommand });
        }
All Usage Examples Of Waf.InformationManager.AddressBook.Modules.Applications.Controllers.ContactController::Initialize