示例#1
0
        private void NavigateTo(NavigationMessage message)
        {
            var activeItem = _conductor.ActiveItem;

            if (CanCloseItem(activeItem))
            {
                CloseItem(activeItem);
            }

            if (message.Item != null)
            {
                ActivateItem(message.Item as T);
            }
            else
            {
                var item = IoC.GetInstance(message.ItemType, null) as T;

                ActivateItem(item);
            }
        }
示例#2
0
        /// <summary>
        /// Navigates the specified message.
        /// </summary>
        /// <param name="message">The message.</param>
        public void Navigate(NavigationMessage message)
        {
            Ensure.That(message).IsNotNull();

            NavigateTo(message);
        }