System.Windows.Data.DataItemContentControl.GetCommand C# (CSharp) Method

GetCommand() protected method

Gets a command by name.
protected GetCommand ( string commandName ) : ICommand
commandName string The name of the command to lookup.
return ICommand
        protected virtual ICommand GetCommand(string commandName)
        {
            object dataItem = DataContext;
            if (dataItem == null) {
                return null;
            }

            return DataCommand.GetDataItemCommand(dataItem, commandName);
        }
DataItemContentControl