Click here to Skip to main content
15,895,656 members
Home / Discussions / WPF
   

WPF

 
QuestionMost popular technology? Pin
Mark Walter Smith11-Mar-10 5:02
Mark Walter Smith11-Mar-10 5:02 
AnswerRe: Most popular technology? Pin
Abhinav S14-Mar-10 20:07
Abhinav S14-Mar-10 20:07 
QuestionUse HTML5 or otherwise? Pin
Mark Walter Smith11-Mar-10 4:59
Mark Walter Smith11-Mar-10 4:59 
AnswerRe: Use HTML5 or otherwise? Pin
Alan Beasley22-Mar-10 2:39
Alan Beasley22-Mar-10 2:39 
QuestionKeyBoard shortcuts Pin
SRKSHOME11-Mar-10 1:00
SRKSHOME11-Mar-10 1:00 
AnswerRe: KeyBoard shortcuts Pin
Pete O'Hanlon11-Mar-10 1:18
mvePete O'Hanlon11-Mar-10 1:18 
GeneralRe: KeyBoard shortcuts Pin
SRKSHOME11-Mar-10 2:33
SRKSHOME11-Mar-10 2:33 
GeneralRe: KeyBoard shortcuts Pin
Pete O'Hanlon11-Mar-10 2:45
mvePete O'Hanlon11-Mar-10 2:45 
By default you can't. There's a technical reason which explains why there's a Label which appears so similar to a TextBlock element (in case you were wondering). Basically, TextBlock inherits directly from FrameworkElement whereas Label inherits from ContentControl. By doing this, TextBlock was free to add a Text property which only allows text. ContentControl elements, however, get a Content element which allows it to hold any form of content (that's why there's no Text element in the Label).

In order to achieve this effect, you'd have to write an Attached Behavior which isn't a trivial undertaking, and certainly isn't worth the effort when a Label does this for you.

I hope this clarifies the whole issue for you.

"WPF has many lovers. It's a veritable porn star!" - Josh Smith

As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.


My blog | My articles | MoXAML PowerToys | Onyx



GeneralRe: KeyBoard shortcuts Pin
SRKSHOME11-Mar-10 3:41
SRKSHOME11-Mar-10 3:41 
QuestionMessage Removed Pin
10-Mar-10 3:17
professionalN_tro_P10-Mar-10 3:17 
AnswerRe: ObservableCollection Changed Pin
Pete O'Hanlon10-Mar-10 4:14
mvePete O'Hanlon10-Mar-10 4:14 
GeneralMessage Removed Pin
11-Mar-10 3:05
professionalN_tro_P11-Mar-10 3:05 
GeneralMessage Removed Pin
11-Mar-10 3:15
professionalN_tro_P11-Mar-10 3:15 
QuestionCreating new Silverlight project silently crashes Visual Web Developer 2008 Pin
Kevin McFarlane10-Mar-10 3:04
Kevin McFarlane10-Mar-10 3:04 
AnswerRe: Creating new Silverlight project silently crashes Visual Web Developer 2008 Pin
carlecomm17-Mar-10 15:22
carlecomm17-Mar-10 15:22 
GeneralRe: Creating new Silverlight project silently crashes Visual Web Developer 2008 Pin
Fred Kling21-Mar-10 8:07
Fred Kling21-Mar-10 8:07 
Questionis it possible? Pin
Joe Rozario10-Mar-10 1:05
Joe Rozario10-Mar-10 1:05 
QuestionBinding a Text Box to Data Context Pin
StyleGuide10-Mar-10 0:06
StyleGuide10-Mar-10 0:06 
QuestionTextBolck move using up & down arrow?? Pin
urooj_mahmood9-Mar-10 19:51
urooj_mahmood9-Mar-10 19:51 
AnswerRe: TextBolck move using up & down arrow?? Pin
Abhinav S14-Mar-10 21:05
Abhinav S14-Mar-10 21:05 
GeneralRe: TextBolck move using up & down arrow?? Pin
urooj_mahmood16-Mar-10 2:44
urooj_mahmood16-Mar-10 2:44 
GeneralRe: TextBolck move using up & down arrow?? Pin
Abhinav S16-Mar-10 3:52
Abhinav S16-Mar-10 3:52 
GeneralRe: TextBolck move using up & down arrow?? Pin
urooj_mahmood16-Mar-10 6:35
urooj_mahmood16-Mar-10 6:35 
GeneralRe: TextBolck move using up & down arrow?? Pin
Abhinav S16-Mar-10 21:15
Abhinav S16-Mar-10 21:15 
GeneralRe: TextBolck move using up & down arrow?? Pin
urooj_mahmood16-Mar-10 21:52
urooj_mahmood16-Mar-10 21:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.