Click here to Skip to main content
12,886,913 members (32,289 online)
Rate this:
Please Sign up or sign in to vote.
See more: WPF

I am new to WPF.

I have label control created in by wrapping on windows .net Label class.

Now I want to migrate Label control from .net to WPF.

I am facing a problem with


The error being text is not present in label class of WPF.

Is there any alternative for text in Label class of WPF.

Also could you please share any document related to migration from .net to WPF

Thanks in advance,

Posted 6-Nov-12 13:53pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

WPF *is* part of .NET. I'm assuming that by .Net you really mean Windows Forms ("winforms").

WPF requires a very different way of thinking about User Interface programming. A "straight conversion" from winforms is not simple.
There are plenty of good books on WPF, none of which I can think of right now. ;)

In any case, the property of the WPF Label object that most closely corresponds to the winforms Label.Text is Content, and it is of type object.

WPF allows a Label to contain essentially anything, including another UIElement (or UIElement structure), string, or ...
Vijay hit 6-Nov-12 20:33pm
Hi Matt,

Thanks for the information.

It helps a lot.


Right, and some good points here; my 5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 6 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100