开发者

TextBox.SelectAll() does not justify text to left in silverlight

开发者 https://www.devze.com 2023-01-24 13:50 出处:网络
I have given a fixed width to the textbox and I don\'t want to wrap the text too. So the problem here is if I enter text larger then the width then on GotFo开发者_运维百科cus event of a textbox I do t

I have given a fixed width to the textbox and I don't want to wrap the text too. So the problem here is if I enter text larger then the width then on GotFo开发者_运维百科cus event of a textbox I do the following :

txtperson.SelectAll();

But it doesn't justify the text from left ? Any help how can I achieve this ?


Well, what you can easily do is to retemplate your textbox. when it gets focus you just change background color of the text and it will does the trick.

0

精彩评论

暂无评论...
验证码 换一张
取 消