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 

WPF translation of custom controls

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



Joined: 02 Feb 2010
Posts: 4

PostPosted: Thu Sep 28, 2017 11:20 am    Post subject: WPF translation of custom controls Reply with quote

I have a UserControl derived class which contains a new property <TextLabel> which is to be translated.

I assume I have to add this Control Type and Content Property to the "Map of Content to Properties". However the resources were not scanned when I added the new UserControl and it's property to the map.

How to do that correctly?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Sep 29, 2017 11:07 pm    Post subject: Reply with quote

You must add an entry to the Scan and Convert Properties table. In this case you can just set Property to TextLabel.

The Map Content to Properties table allows you to handle controls where the default property is omitted in the XAML and included in content instead. For instance:

Code:
<TextBlock>Some Text</TextBlock>


Instead of:

Code:
<TextBlock Text="Some Text"/>


It maps the content of that control to a property - which is then scanned using the Scan and Convert Properties table.
_________________
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