private void SetCommandFromFactory(ICommandFactory commandFactory)
        {
            this.updatePriority = PriorityItem.CommandFactory;

            if (commandFactory == null || CommandProvider == null) {
                return;
            }

            if (CommandProvider.CommandFactories.Any((f) => AreCommandFactoriesEqual(f, commandFactory))) {
                this.updatePriority = PriorityItem.None;

                this.allowPropertyBehaviours = false;

                try {
                    var command = commandFactory.CreateCommand();
                    commandFactory.PopulateCommand(command, CommandProvider);

                    Command = command;
                } finally {
                    this.allowPropertyBehaviours = true;
                }
            }
        }