I have been in this situation twice. First time, I triggered the metal detector (frame) alarm and was pulled aside by female security officer for extra check. The pat down was very gentle and it did not come close to "that" part, so I did not say a thing to her.
The second time was when they had Milimeter wave scanners installed in the Frankfurt airport - apparently the operator visually gendered me female and thus the equipment scanned my body image according to female pattern (which triggered the unavoidable anomaly). Again, I was led aside by female officer. Once I noticed that this time the pat down was more detailed, I silently told her that I am transsexual. She did not understand at first, and asked me "You are... what?" while keeping on with the pat down - then she reached the "anomaly" region and there was that "Ah, I understand now." And then with some amount of humour "So, are You male or female?" I replied that I am "male-to-female transsexual", we both laughted at the situation and she was smiling when we parted. It was very friendly and probably they were instructed about such possibility in their training, but apparently I was the first transgender traveller she had met

.
I would advise not to disclose unless You see that You absolutely have to. Besides, I would not be happy with male officer frisking me, because the security stuff is quite thorough with that procedure and they did follow the breast outlines on both occasions, so the male officer might become quite confused once he literally grabs Your breasts, plus, You might not be happy with that either.
Oh, and I dont have female name and gender marker in my papers, but as You correctly noted, they dont look at them, they just gender You visually.