Requirement:
Set the font, the foreground and background color of the grid (headerrow and and "datarow) at runtime over a context menu. Save it and reload theses on restart.
Actual situation:
- We have implemented a contextmenu for the grid with an attached property. On attaching it "taps" the grid and it is possible to enable and disable single columns over this context menu which opens on right mouse click on header.
- Additional to that, we implemented an additional attached property which also "taps" to the grid OnAttaching, which allows to save the grid settings (columns width, enable columns, filter...) to a file. Add restart the grid takes this settings add set the saved values.
- The grid is styles are in different resource dictionaries which will be added to Application.Current.Resources.MergedDictionaries
Problem:
Now, I would like to add some additional context menu (this works) with color pickers and a font picker (does telerik have a font picker in future for wpf?).
If an new color is selected I created a new style (in code behind) an added it to the resources of the grid. This runs, but now I can't find a solution to save this style like the over values.
How can I save this lokal style? Is this solution wrong? Do you have an better simpler solution?
Thanks & Regards