I think in this case it is not OK by the question owner (I am in the lucky situation that I am everyone is now able to see the questionquestion.
The question maybe a simple one for an experienced user in that field (I am not), so I can see a reason for the asker that, after he understood the answer, he wants his "simple" question be removed from his history.
But:
It was a problem for the asker, that he was not able to solve by himself.
You took the time and answered his question and explained the issue to him.
I assume this helped the asker to understand and solve his issue.
For me your answer looks valuable for others and deserves the rep for your effort.
So in my opinion it was not correct by that asker, he took the help and denied your reward.
My own experience
I think I am in a very similar situation than that asker, I am new to wpf and make stupid mistakes from time to time. So at least my last two questions on SO, will look quite strange in my SO history compared to my reputation. The issues turned out to be no real problems, but "simple" mistakes by myself, but each answer helped me to find them and understand a bit more about wpf and the last thing I would do is not to give rep to the people that helped me.