To give you an overview about our problem I start describing our technical starting position:
To take advantage from reusability we try to combine a GridViewDataControl and a RadDataForm within a new custom control (in our example project attached its called "DataFormAlpha"). > see screenshot #1
We introduced new DependencyProperties in the custom control to expose properties from the nested controls and used element to element binding inside XAML to share them with the grid and the dataform. > see screenshot #2
The first problem we encountered was that data annotations are not passed through when the RadDataForm is in mode “AutoGenerateFields = False”. As a workaround we created an own control inherited from DataFormDataField where we read out the display attribute by reflection and set the values to the related Label and Description properties in the OnApplyTemplate event handler. Please also refer to http://www.telerik.com/community/forums/silverlight/data-form/display-annotation.aspx > see screenshot #3
Unfortunately the values are not displayed initially because the event is not thrown if the CurrentItem property of the dataform is bound. > see screenshot #4
Without assigning the property the workaround is working fine but the DataForm CurrentItem is not set according to the GridView item which was selected anymore.
Moreover the custom CurrentItem dependency property does not update the bound object from the viewmodel , although it was set explicitly to “Mode=TwoWay”. > see screenshot #5
Please give us advice if the general approach is feasible and how to proceed with the exposing of dependency properties from user control to parent control, data annotation and CurrentItem problem.
A running example showing the behaviour mentioned above can be found here https://rapidshare.com/files/3847127994/TestDataForm.zip
Screenshots are enclosed.
Thank you for your assistance