I have developed an App in WPF using C#, now the problem is i want my application as licensed version, for first 30 days it should be free i.e., trial version so now when it com
There is no out-of-the-box way of doing this (Though there are SDK's out there that you can buy that do it for you). The general concerns are:
Some options / thoughts on the points are:
Encoding the details into a key can be easy enough if you have a limited number of functions (or just licensed or not). Base32 encoding will generally produce easy to re-key value with a reasonable amount of bits to encode number of users or the like. If you have more data to encode (lots of licensable features) then a "key" can be more problematic. In the past I have used a key that does nothing much other than act as an association to a downloadable xml file, which has very detailed feature breakdown.
Depending on your application you can either store in the file system, registry or database. It could be worth trying the license to something about the system, for example motherboard ID, database details, etc.
My general preference is to use an online activation and digital signatures to ensure data is not tampered with. You can obviously also try and encode the anti-tampering stuff into the key as checksum bits. You also need to concern yourself with people moving their clock back, which you could do something like check an internet time provider every X launches to ensure their time is within X minutes of it for their time-zone. Also whether the current date/time is before the previous launch date/time.
This is entirely up to you. You can show a dialog on launch to push people to your license purchase page. Or (and probably better for conversion but harder to code) is to disable certain (key) features to encourage people to upgrade, but they still have a semi-functional application if not.
With all that said, no matter what you do someone will always find a way to circumvent your licensing if they really want to (Just ask the likes of Microsoft or Adobe). So it is a question of how much time you want to invest in writing clever licensing mechanisms vs. the cost in lost sales from people circumventing it vs. how easy it is for real customers to license you application (as if it is too hard you will turn people off buying).
Hope that helps a little.