Question

In my Windows Phone App I want to have a TextBox which must be readOnly, but this makes its Foreground color look grayish, I want the Foreground color to be black, Is that possible?

Or how else can I have a textblock with black font, but not editable by the user?

Was it helpful?

Solution

You can change the Style of your TextBox for the disabled state. To achieve this more easily, you can open your .xaml document in Expression Blend, Right Click in your TextBox -> Edit Template... -> Edit a Copy.

Then you choose the name you want for your Style. After that search for the States Tab, and click it. After that choose the disabled state. Then you can edit the TextBox to be whatever you like for the disabled state.

OTHER TIPS

Also you can just set TextBox Style to null, and set Foreground as usual.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top