2014-09-03 55 views
0

我需要的風格PhoneTextBox( 「CLR的命名空間:Microsoft.Phone.Controls;裝配= Microsoft.Phone.Controls.Toolkit」)如何在Windows Phone 8中設置PhoneTextBox的樣式?

<toolkit:PhoneTextBox x:Name="txtName" InputScope="Text" PlaceholderText="name"/> 

我使用的,而不是提示屬性PlaceHolderText。我能夠找到適用於提示的默認樣式。但不適用於PlaceholderText。請指導我。

回答

0

PhoneTextBox沒有PlaceholderText屬性。它存在於TextBox,Windows RuntimePhoneTextBox的類似屬性是Hint,我目前建議您使用。

如果您需要style \ template PhoneTextBox控件,您可以隨時在Windows Phone Toolkit源代碼(Generic.xaml)中找到原始樣式。

+0

謝謝!但是我沒有找到PhoneTextBox的提示。相反,我得到了PlaceholderText。 – meetme 2014-09-03 09:04:58

+0

我已經使用WPtoolkit.Kinnara。 – meetme 2014-09-03 09:15:20

+0

@Meee它改變了一切:)在這裏你去:[Generic.xaml](https://github.com/Kinnara/WPToolkit/blob/custom/Microsoft.Phone.Controls.Toolkit.WP8/Themes/Generic.xaml)檢查1489行。 – 2014-09-03 09:17:55