Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

UserControl property localization

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Globalizer Support
View previous topic :: View next topic  
Author Message
CodeIt



Joined: 07 Oct 2009
Posts: 1

PostPosted: Wed Oct 07, 2009 1:57 pm    Post subject: UserControl property localization Reply with quote

I recently purchased Globalizer.net. It saves me a lot of work. However i have one issue. I have a form (which overrides from anohter form) with a usercontrol on it (same project). This usercontrol has a property, called 'DisplayText'. I'm able to set this property in the Visual Studio Designer. When scanning the form (without any filters) Globalizer.NET won't find my 'DisplayText' property.
Is there something i did wrong, or do i need to add some sort of property attribute to my property?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Oct 07, 2009 9:42 pm    Post subject: Reply with quote

If you are defining a custom property on a user control then you need to add the Localizable attribute to the property. This tells .NET that the property needs to be serialized from localized resources. The following code shows how to do this:

Code:
[Localizable(true)]
public string ToolTip
{
    get { return _toolTip; }
    set { _toolTip = value; }
}

_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Globalizer Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group