Пример #1
0
        private void UninitializePopup()
        {
            popupControl.ListBoxKeyDown -= ListKeyDown;
            popupControl.ListBoxItemDoubleClick -= ListItemDoubleClick;

            if (popupControl.IsOpen)
                popupControl.IsOpen = false;

            popupControl = null;
        }
Пример #2
0
        private void InitializePopup(List<TreeNode> source)
        {
            popupControl = new IntellisensePopup();
            popupControl.ViewModel.TreeNodes = new ObservableCollection<TreeNode>(source);
            popupControl.PlacementTarget = editorTextBox;
            popupControl.Placement = PlacementMode.Bottom;

            popupControl.ListBoxKeyDown += ListKeyDown;
            popupControl.ListBoxItemDoubleClick += ListItemDoubleClick;

            popupControl.IsOpen = true;
        }