user1479013
user1479013

Reputation: 145

how to allow only one line in rich text box

I'm using WPF (C#).

I want the user to be able to only type one line in a rich text box (can't press enter key). Could anyone tell me how can I set up this kind of rich text box property?

Upvotes: 3

Views: 3470

Answers (1)

Nikhil Agrawal
Nikhil Agrawal

Reputation: 48568

Set its AcceptsReturn property/attribute to false.

Upvotes: 6

Related Questions