public static ObservableCollection<Tag> FromArray(string[] tags, TagSelectedDelegate callback) { Tag[] res = new Tag[tags.Length]; for (int i = 0; i < tags.Length; i++) res[i] = new Tag(tags[i], callback); return new ObservableCollection<Tag>(res); }
public Tag(string text, TagSelectedDelegate callback) { this.Text = text; this.callbackSelected = callback; InitializeComponent(); }