Hello,
I have a xamdatagrid in my application (in xaml).
In code i create a new xamdatagrid (on button click). I want to copy all style properties from the datagrid i have in xaml to the one i create in code. How can i do it without having to define everystyle property from beginning? is there a way to bind these properties?
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking through your post and I suggest you copy the Resources from your XamDataGrid, defined in XAML, to the one defined in code-behind like this:
myGrid.Resources = xamDataGrid1.Resources;
If you defined your styles in Window’s or Application’s Resources, without a Key, then they will apply automatically.
Feel free to write me if you have further questions.