Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
300
Add Style Exception (Bugg ??)
posted

 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 

Parents Reply Children