Catel.Windows.Interactivity.FocusOnKeyPress.Subscribe C# (CSharp) Method

Subscribe() private method

private Subscribe ( ) : void
return void
        private void Subscribe()
        {
            Unsubscribe();

            _layoutRoot = AssociatedObject.FindLogicalRoot() as FrameworkElement;
            if (_layoutRoot != null)
            {
                Log.Debug("Found layout root '{0}', subscribing to KeyDown event", _layoutRoot.GetType().GetSafeFullName(false));

                _layoutRoot.KeyDown += OnKeyDown;
            }
        }