public SetterBaseCollection newSetters(txtPreperty property) { SetterBaseCollection setterBases = new SetterBaseCollection(); foreach (SetterBase setterBase in baseStyle.Setters) { setterBases.Add(setterBase); } return(setterBases); }
public Style newCellStyle(txtPreperty property, Setter addSetter) { //Style customCell = FindResource("customCell") as Style; // MessageBox.Show(customCell.ToString()); Style style = new Style(typeof(DataGridCell), baseStyle); foreach (SetterBase setter in newSetters(property)) { style.Setters.Add(setter); } style.Setters.Add(addSetter); return(style); }