public void Reset() { NewTagName = string.Empty; NewTagColor = AvailableColors.First(); ReadTagNames(); ClearValidationErrors(); }
public Window1() { InitializeComponent(); SelectedColors = new Dictionary <string, ColorInfo>(); SelectedColors.Add("color0", AvailableColors.First()); SelectedColors.Add("color1", AvailableColors.Last()); XmlReader xaml = XmlReader.Create("newcontrol.xml"); newControl.Content = XamlReader.Load(xaml); newControl.DataContext = SelectedColors; DataContext = this; }