Transparent textbox when textbox GotFocussed Windows Phone 8.1?

Posted by user3701923 on Stack Overflow See other posts from Stack Overflow or by user3701923
Published on 2014-06-04T09:20:00Z Indexed on 2014/06/04 9:24 UTC
Read the original article Hit count: 147

I need to have transparent textbox, in my WindowsPhone 8.1 Runtime application.

I made Background="Transparent" to the textbox, so it is transparent when it is loaded.

But on focus, background color changed to white. I write the following code, to make it transparent. But it doesn't run.!

<TextBox Background="Transparent" GotFocus="titleBox_GotFocus" />

C#

private void titleBox_GotFocus(object sender, RoutedEventArgs e)
{
    titleBox.Background = new SolidColorBrush(Colors.Transparent);
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about windows-phone-8.1