This is a migrated thread and some comments may be shown as answers.
Use DataForm ViewModel in Xamarin.Forms and WPF
1 Answer 31 Views
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 31 Mar 2016, 11:37 PM
I am doing some research on porting an old WPF app in a way that we could have a common layer for the Model and ViewModel so we can have an Android app using Xamarin Forms (maybe later iOS) and a WPF app for Windows 7 users.  The DataForm would be perfect.  Is it possible to have data annotations that would work for both or do you have to duplicate effort here.

1 Answer, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 05 Apr 2016, 08:54 AM
Hello Jon,

Thank you for contacting us! Yes, you can share the viewmodel between WPF and Xamarin Forms apps.
Our Xamarin Forms components share their code through portable libraries including the attributes used by DataForm. 

In order to us the attributes you would need to add reference the the following assemblies and its xamarin dependencies if needed:
 - Telerik.XamarinForms.Common.dll
 - Telerik.XamarinForms.DataControls.dll

Please, find the iamgeof the portable profile that these assemblies support -http://screencast.com/t/JhJZlQOWLj

Regards,
Tsvyatko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Jon
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Share this question
or