2016-03-03 61 views
1

現在我正在編輯。 當文本框的重點是,藍色的邊框線出現關於文本框焦點的邊框顏色。 C#Xaml Windows Phone8.1

像這樣(左和右的藍線)。

enter image description here

但我並不需要這個藍(重點)線。所以,我想抹掉這些線條。 而我不知道如何抹去。

現在我的xaml代碼是這樣的。

<TextBox x:Name="textBox" 
      Background="White" 
      HorizontalAlignment="Center" 
      VerticalAlignment="Center" 
      TextWrapping="Wrap" 
      Width="360" 
      Height="200" 
      Text="TextBox" /> 

這些可以通過xaml代碼改變嗎?

+1

'BorderThickness =「0」'help? – Sakura

+0

謝謝!有效! –

+1

很高興幫助。我會把它作爲答案發布。 – Sakura

回答

1

您似乎想要完全清除該邊框。爲此,請將BorderThickness="0"添加到您的XAML中:

<TextBox x:Name="textBox" 
     Background="White" 
     HorizontalAlignment="Center" 
     VerticalAlignment="Center" 
     TextWrapping="Wrap" 
     Width="360" 
     Height="200" 
     BorderThickness="0,0,0,0" 
     Text="TextBox" />