public void OnHidden(TextBoxOverlayHideEventArgs e) { if (Hidden != null) { Hidden(_Element, e); } }
public void DoSnippetHidden(object o, TextBoxOverlayHideEventArgs e) { _TextBoxOverlay.Hidden -= SnippetHidden; ListBoxItem lbi = (ListBoxItem)o; Snippet s = (Snippet)lbi.DataContext; if (e.Result == TextBoxOverlayResult.Accept) { s.Name = e.ResultText; WriteValues(); } }
public void DoCategoryHidden(object o, TextBoxOverlayHideEventArgs e) { TabItem ti = (TabItem)o; SnippetCategory c = (SnippetCategory)ti.DataContext; if (e.Result == TextBoxOverlayResult.Accept) { c.Name = e.ResultText; WriteValues(); } _TextBoxOverlay.Hidden -= CategoryHidden; }
public void Hide(TextBoxOverlayResult result) { if (IsOpen) // only hide once { if (_ElementAdorner != null) { AdornerLayer layer = VisualTreeHelper.GetParent(_ElementAdorner) as AdornerLayer; if (layer != null) { _ElementAdorner.Hide(); layer.Remove(_ElementAdorner); } } TextBoxOverlayHideEventArgs e = new TextBoxOverlayHideEventArgs(result, Text); OnHidden(e); IsOpen = false; } }
public void OnHidden(TextBoxOverlayHideEventArgs e) { if (Hidden != null) Hidden(_Element, e); }