set its wrap propertytxt1.Attributes["wrap"] = "hard";