1

I have a textbox that has a black background, I want to change its caret color to white.How do i achieve it?

Thanks

2 Answers 2

0

Unfortunately, I don't believe this is possible. There is no property on the TextBox to perform this and the default template for the TextBox provides no means of manipulating the content and therefore, the caret. I believe that this is because the content is provided through the XcpImports class.

As far as I can ascertain, XcpImports is the abstraction layer between the Silverlight plug-in and the operating system (Windows, OS/X). Therefore, you cannot actually get at the real text box to manipulate the caret unless Silverlight provides a route to do it, which it does not.

0

Not possible in Silverlight 2 (as your post is flagged), but for future reference (and others landing on this page from Google as I did) in Silverlight 3 the TextBox has a CaretBrush property...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.