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