Hi,
In XAML I would do something like this:
<EntryCell x:Name="passenger" Label="{i18n:Translate Passenger_Label}" Placeholder="{i18n:Translate Passenger_Entry_Placeholder}" Text="{Binding PassengerName}"></EntryCell>
But I am not exactly sure how to register editors in XAML for the Telerik controls everything seems to point towards decorating the viewmodel and handling everything in the code behind. If that is the case should I use the Display attribute from System.ComponentModel.DataAnnotations to address this issue? Something like:
[Display(ResourceType = typeof(CurrentLocale), Name = "Passenger_Label"))]
public string PassengerName{ get; set; }
Also, using this approach how would I address the placeholder?
Thanks,
Chris
8 Answers, 1 is accepted
You are right that the editors of the RadDataForm cannot be configured in XAML. Users should register the property - editor pair in code. In addition to this users should decorate their ViewModel in a way that fits their scenario. Please take your time to have a look at our online documentation. We have described how the control should be configured and which attributes can be used. Also, there are some simple examples that will get you started.
If you encounter anything that you think can be explained better or we have missed to explain we would really appreciate your feedback.
Regards,
Pavel R. Pavlov
Telerik by Progress
The response dont clears the question, at least to me.
How you are able to Localize the following DataAnnotation:
[DisplayOptions(Header = "Your header text goes here", Group = "Some group name")] ??
The DataAnnotation does not have a Property to set ResourceType.
Solution?
best regards
Marc
The DisplayOptions annotation allows you to set whatever string you need. If you need to localize the control you just need to set the correct string accordingly.
You may find interesting this article.
Regards,
Pavel R. Pavlov
Telerik by Progress
Sorry I dont understand, as we are not able to set a DataAnnotation with a Resources.Manager String?
Our app is Localized with the Xamarin.Forms example you addressed, but a Resx value isnt a Constant variable
and thats why we are not able to put it on a DataAnnotation String, as it requires a Constant string.
Can you give me an example on how you would localize your Data Model with a localized DataAnnotation?
Best regards
Marc
Thank you for further clarifying your case. I can see your point now.
At the time of writing there is no convenient localizing mechanism that can be used in the RadDataForm. We have intentions to provide one and this is why we exposed the following item. If you follow it you will be notified whenever we change its status.
Regards,
Pavel R. Pavlov
Telerik by Progress
As I can see the Requested Feature is 1 year old. Is there a estimation when it will be available?
Because as now, this DataForm feature is totally useless if you are working with a Multi-Language App.
As today I suppose the most Apps are Multi language or at least should be.
Best regards
Marc
We cannot promise a timeframe for when the feature will be released. If you follow the Feedback Portal item, you'll be notified of status changes.
You'll see the status change from "Approved" to "In Development" when the dev team starts on it. When it's finished and released, it will finally change to "Completed".
Regards,
Lance | Tech Support Engineer, Sr.
Telerik by Progress
Hi Mark, running into the same issue here. Just voted on the issue.
Did you happen to find a workaround until the issue is implemented by telerik?