Just a simple thing is going to drive me crazy.
It looks like that the Header property isn't supported by System.Windows.Controls.TextBox! WHY?
But the screen-shot at http://msdn.microsoft.com/en-us/library/hh202916%28v=vs.92%29.aspx claims that there is a Header property for TextBox!?
I am confused ... Also PhoneTextBox does not support a Header property?
See also:
TextBox Control Design Guidelines for Windows Phone:
http://msdn.microsoft.com/en-us/library/hh202916%28v=vs.92%29.aspx
Workaround for headers on TextBox controls:
http://forums.create.msdn.com/forums/p/77167/468516.aspx
Is it possible to add a Header property to the textbox control:
http://forums.create.msdn.com/forums/p/76127/576970.aspx
So I am not completely alone with that TextBox.Header question ... But what is the one and only answer for TextBox.Header? Even the MSDN article "TextBox Control Design Guidelines for Windows Phone" shows a screen-shot of TextBoxes using Header and pointing to System.Windows.Controls.TextBox that control does not support it!?
The workaround by "EGL" looks nice but how to define the InputScope (for example when I just need "Numbers") in XAML? Thank you for bringing some light into the dark ;-)
--Harald-René Flasch (aka hfrmobile)
Comments: ** Comment from web user: shawnoster **
It looks like that the Header property isn't supported by System.Windows.Controls.TextBox! WHY?
But the screen-shot at http://msdn.microsoft.com/en-us/library/hh202916%28v=vs.92%29.aspx claims that there is a Header property for TextBox!?
I am confused ... Also PhoneTextBox does not support a Header property?
See also:
TextBox Control Design Guidelines for Windows Phone:
http://msdn.microsoft.com/en-us/library/hh202916%28v=vs.92%29.aspx
Workaround for headers on TextBox controls:
http://forums.create.msdn.com/forums/p/77167/468516.aspx
Is it possible to add a Header property to the textbox control:
http://forums.create.msdn.com/forums/p/76127/576970.aspx
So I am not completely alone with that TextBox.Header question ... But what is the one and only answer for TextBox.Header? Even the MSDN article "TextBox Control Design Guidelines for Windows Phone" shows a screen-shot of TextBoxes using Header and pointing to System.Windows.Controls.TextBox that control does not support it!?
The workaround by "EGL" looks nice but how to define the InputScope (for example when I just need "Numbers") in XAML? Thank you for bringing some light into the dark ;-)
--Harald-René Flasch (aka hfrmobile)
Comments: ** Comment from web user: shawnoster **
I'm glad you found a solution that worked for you. You're correct, the MSDN article doesn't mention a TextBlock, it also doesn't mention a header :) The "header"/TextBlock/labels are just to help represent a typical looking page, not imply that there is a HeaderedTextBox control.
The StackPanel + TextBlock + TextBox isn't a bad idea at all unless you have a lot of those controls and then there might be perf issues.
Another option is to look at the HeaderedContentControl in the desktop version of the toolkit, you could probably just pull the control straight over into your phone app and that gives you the concept of a headered "anything".