Beispiel #1
0
 public void OnHidden(TextBoxOverlayHideEventArgs e)
 {
     if (Hidden != null)
     {
         Hidden(_Element, e);
     }
 }
Beispiel #2
0
        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();
            }
        }
Beispiel #3
0
        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;
        }
Beispiel #4
0
        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;
            }
        }
Beispiel #5
0
 public void OnHidden(TextBoxOverlayHideEventArgs e)
 {
     if (Hidden != null) Hidden(_Element, e);
 }
Beispiel #6
0
        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;
            }
        }
Beispiel #7
0
        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();
            }
        }
Beispiel #8
0
        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;
        }