View previous topic :: View next topic |
Author |
Message |
lahi
Joined: 02 Feb 2010 Posts: 4
|
Posted: Thu Sep 28, 2017 11:20 am Post subject: WPF translation of custom controls |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Sep 29, 2017 11:07 pm Post subject: |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
|