internal void HandleMoveFocus(object sender, MoveFocusEventArgs e)
            {
                if (_element == null || _property == null)
                {
                    return;
                }

                var binding = BindingOperations.GetBinding(_element, _property);

                if (binding == null)
                {
                    return;
                }

                if (e.FocusedProperty != binding.Path.Path)
                {
                    return;
                }

                // Delay the call to allow the current batch
                // of processing to finish before we shift focus.
                _element.Dispatcher.BeginInvoke((Action) delegate
                {
                    _element.Focus();
                },
                                                DispatcherPriority.Background);
            }
            internal void HandleMoveFocus(object sender, MoveFocusEventArgs e)
            {
                if (_element == null || _property == null)
                    return;

                var binding = BindingOperations.GetBinding(_element, _property);
                if (binding == null)
                    return;

                if (e.FocusedProperty != binding.Path.Path)
                    return;

                // Delay the call to allow the current batch
                // of processing to finish before we shift focus.
                _element.Dispatcher.BeginInvoke((Action)delegate
                {
                    _element.Focus();
                },
                DispatcherPriority.Background);
            }
 void RaiseMoveFocus(string focusedProperty)
 {
     var handler = this.MoveFocus;
     if (handler != null)
     {
         var args = new MoveFocusEventArgs(focusedProperty);
         handler(this, args);
     }
 }