A long time ago while developing a custom control, I wrote a piece of code which allows a developer to enter "Auto" as string to a custom property of type double. Yesterday, I was in a need to use the same functionality in one of my control.   That reminds me the previous implementation and fortunately I was able to get it from TFS repository. Thus I thought to share the same with you in case you need it in future.   If you are building a custom control, you might want to add a double type property to set a specific height or width of the control and in that case, you might want to give user (I mean the developer who is using this control in his/her application) the option to set "Auto" value as the Height and Width properties of Framework Element does.   If you set the string value "Auto" to your custom double type property, you will get the following error: "Cannot convert source type 'string' to target type 'double'". This is a real fact. You can not...

✔ Read More...
I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to
C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials, XAML, AutoToDoubleTypeConverter