public void SetForegroundBrush(IBrush brush, int startIndex, int length) { var key = new FBrushRange(startIndex, length); int index = _foregroundBrushes.FindIndex(v => v.Key.Equals(key)); if (index > -1) { _foregroundBrushes.RemoveAt(index); } if (brush != null) { _foregroundBrushes.Insert(0, new KeyValuePair <FBrushRange, IBrush>(key, brush)); } }
public void SetForegroundBrush(IBrush brush, int startIndex, int length) { var key = new FBrushRange(startIndex, length); if (brush == null) { if (_foregroundBrushes.ContainsKey(key)) { _foregroundBrushes.Remove(key); } } else { _foregroundBrushes[key] = brush; } }
public void SetForegroundBrush(IBrush brush, int startIndex, int length) { var key = new FBrushRange(startIndex, length); int index = _foregroundBrushes.FindIndex(v => v.Key.Equals(key)); if (index > -1) { _foregroundBrushes.RemoveAt(index); } if (brush != null) { _foregroundBrushes.Insert(0, new KeyValuePair<FBrushRange, IBrush>(key, brush)); } }
public void SetForegroundBrush(IBrush brush, int startIndex, int length) { var key = new FBrushRange(startIndex, length); if (brush == null) { if (_foregroundBrushes.ContainsKey(key)) _foregroundBrushes.Remove(key); } else { _foregroundBrushes[key] = brush; } }