Click here to Skip to main content
12,298,267 members (54,160 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: WPF
Hi,

I am new to WPF.

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

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

I am facing a problem with

Mybase.Text.

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,

Vijay
Posted 6-Nov-12 13:53pm

1 solution

Rate this: bad
 
good
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. Wink | ;)

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 ...
  Permalink  
Comments
Vijay hit 6-Nov-12 20:33pm
   
Hi Matt,

Thanks for the information.

It helps a lot.



Regards,

Vijay
   
Right, and some good points here; my 5.
--SA

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
Web01 | 2.8.160525.2 | Last Updated 6 Nov 2012
Copyright © CodeProject, 1999-2016
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