public void Initialize(IGroupWriter input, Func <StringColor> background, Func <StringColor> foreground) { Background = background; Foreground = foreground; if (input != null) { Groups = input; if (!Groups.Contains(i => i is DefaultColors)) { Groups.Insert(0, new DefaultColors()); } if (SelectedGroup == null) { SelectedGroup = Groups.FirstOrDefault <IGroup>(); } } }
public ColorsPanel(IGroupWriter input, Func <StringColor> background, Func <StringColor> foreground) : base(Resources.Uri("Images/Colors.png")) { Initialize(input, background, foreground); }