hi,
i try to add style to my CellValuePresenterStyle with C# .
But when this run :
foreach (var _cellTab in _tabCell) { Style _styleCellPresent = _cellTab.Field.Settings.CellValuePresenterStyle; Style _styleSurligne = (Style)dcPnl.FindResource("Surligne"); for (int i = 0; i < _styleSurligne.Setters.Count; i++) { _styleCellPresent.Setters.Add(_styleSurligne.Setters[i]); } }
I have an exception :
InvalidOperationEception
"PresentationFramework"
After a 'SetterBaseCollection is in use (sealed), it can not be changed.
I have the Add methode to the Setters why i don't add style ?
what is the probleme and how to circumvent the problem ?
thanks,
Nathalie
Thanks josh
but how change the background color of a cell programmatically ?
why the AssociatedCellValuePresenter is not accessible , it will be more simple for change the back color, border and other .. ?
thank ,