private void _PopupPanel_Closed(object sender, EventArgs e)
        {
            UIElement cell = XceedVisualTreeHelper.GetCellByEditor(this);

            if (cell != null)
            {
                Keyboard.Focus(cell);
            }
        }
示例#2
0
        private void _PopupPanelClosed(object sender, EventArgs e)
        {
            // NOTE : set focus to parent cell for support arrow keys navigation
            UIElement cell = XceedVisualTreeHelper.GetCellByEditor(this);

            if (cell != null)
            {
                Keyboard.Focus(cell);
            }
        }
示例#3
0
        ///////////////////////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Sets focus to relative cell.
        /// </summary>
        /// <param name="sender">Ignored.</param>
        /// <param name="e">Ignored.</param>
        private void _ComboBox_DropDownClosed(object sender, EventArgs e)
        {
            UIElement cell = XceedVisualTreeHelper.GetCellByEditor(this);

            if (cell != null)
            {
                Keyboard.Focus(cell);
            }

            if (DropDownClosed != null)
            {
                DropDownClosed(this, null);
            }
        }
        /// <summary>
        /// If it is polyline barrier then hide combobox and show textblock.
        /// </summary>
        private void _InitVisibility()
        {
            // Get Barrier.Geometry type.
            Cell    cell    = XceedVisualTreeHelper.GetCellByEditor(this);
            Row     row     = XceedVisualTreeHelper.FindParent <Row>(cell);
            Barrier barrier = row.DataContext as Barrier;

            // If barrier is polyline or have no geometry hide edit control.
            if (barrier.Geometry == null || barrier.Geometry is ESRI.ArcLogistics.Geometry.Polyline)
            {
                _border.Visibility    = System.Windows.Visibility.Hidden;
                _popupPanel.Child     = null;
                _textBlock.Visibility = System.Windows.Visibility.Visible;
                if (barrier.Geometry is ESRI.ArcLogistics.Geometry.Polyline)
                {
                    _textBlock.Text = (string)App.Current.FindResource("BlockTravelString");
                }
            }
        }
        /// <summary>
        /// React on dependency property changing.
        /// </summary>
        private void _OnValueChanged()
        {
            if (_barrier != null)
            {
                _barrier.PropertyChanged -= new PropertyChangedEventHandler(_BarrierPropertyChanged);
            }

            Cell cell = XceedVisualTreeHelper.GetCellByEditor(this);
            Row  row  = XceedVisualTreeHelper.FindParent <Row>(cell);

            _barrier = row.DataContext as Barrier;

            if (_barrierEditor != null)
            {
                _barrierEditor.Barrier = _barrier;
            }

            if (_barrier != null)
            {
                _barrier.PropertyChanged += new PropertyChangedEventHandler(_BarrierPropertyChanged);
            }
        }