My first Chinese Martial Art was Yang-style Taijiquan, and I went into it with one knee injured from skiing. After years of knee pain, I began to practice Xingyiquan. That fixed it for me. I am not even sure which knee was originally injured.
But I still find careless practice of Yang-style Taijiquan the fastest way to sore knees for me (for the record, Chen-style Taijiquan and Xingyiquan *never* cause me knee stress, and Baguazhang sometimes does, a little). When practicing Yang-style, I have found it particularly important to take as much movement and weight as possible in the kua (hips), the practical consequence of which is that the hips rotate instead of the knees twisting / moving. This is probably difficult to communicate in print, but the result tends to be that my weight stays further back, and my forward knee never goes past the middle of the foot (the toes are already too far, in my experience!).