/// <summary> /// Raises the TagClick event /// </summary> internal void RaiseTagApplied(TokenizedTagItem tag) { /* * if (this.IsSelectable) * this.SelectedItem = tag; */ TagApplied?.Invoke(this, new TokenizedTagEventArgs(tag)); }
// ReSharper disable once MethodOverloadWithOptionalParameter public void OnApplyTemplate(TokenizedTagItem appliedTag = null) { var createBtn = GetTemplateChild("PART_CreateTagButton") as Button; if (createBtn != null) { createBtn.Click -= CreateBtnClick; createBtn.Click += CreateBtnClick; } base.OnApplyTemplate(); if (appliedTag != null && !ReferenceEquals(TagApplied, null)) { TagApplied.Invoke(this, new TokenizedTagEventArgs(appliedTag)); } }
public void OnApplyTemplate(TokenizedTagItem appliedTag = null) { Button createBtn = this.GetTemplateChild("PART_CreateTagButton") as Button; if (createBtn != null) { createBtn.Click -= createBtn_Click; createBtn.Click += createBtn_Click; //createBtn.Focus(); // nixin - focuses //createBtn_Click(createBtn, null); } base.OnApplyTemplate(); if (appliedTag != null && !object.ReferenceEquals(TagApplied, null)) { TagApplied.Invoke(this, new TokenizedTagEventArgs(appliedTag)); } }
/// <summary> /// Raises the TagClick event /// </summary> internal void RaiseTagApplied(TokenizedTagItem tag) { TagApplied?.Invoke(this, new TokenizedTagEventArgs(tag)); }