As a purely practical matter, if David had a right to take Uriah's wife, then why did he attempt to cover up the affair, then have Uriah murdered when the cover up failed, and why did God then kill the child concieved by that act (whose death King David agreed was a judgement from God). If David had a right to take her as King, then he would have simply exercised his right and spared Uriah's life and Nathan a trip to the Court.
2 Samuel 11:14-15 [NIV] In the morning David wrote a letter to Joab and sent it with Uriah. In it he wrote, “Put Uriah out in front where the fighting is fiercest. Then withdraw from him so he will be struck down and die.”
2 Samuel 11:26-27 [NIV] When Uriah’s wife heard that her husband was dead, she mourned for him. 27 After the time of mourning was over, David had her brought to his house, and she became his wife and bore him a son. But the thing David had done displeased the LORD.
2 Samuel 12:13-14 [NIV] Then David said to Nathan, “I have sinned against the LORD.”
Nathan replied, “The LORD has taken away your sin. You are not going to die. But because by doing this you have shown utter contempt for the LORD, the son born to you will die.”
David's actions prove that David knew what he did was wrong. And God's actions confirm it. That it violates the Ten Commandments is just the nail in the coffin of any argument that David had a right to take the wife of another. Technically, he got off light. The penalty under the law if they had been caught in the act was death.
Leviticus 20:10 [NIV] “ ‘If a man commits adultery with another man's wife—with the wife of his neighbor—both the adulterer and the adulteress are to be put to death.
Deuteronomy 22:22 [NIV] If a man is found sleeping with another man’s wife, both the man who slept with her and the woman must die. You must purge the evil from Israel.