示例#1
0
        /// <inheritdoc/>
        protected override void OnGotFocus(GotFocusEventArgs e)
        {
            base.OnGotFocus(e);

            if (e.NavigationMethod == NavigationMethod.Directional)
            {
                e.Handled = UpdateSelectionFromEventSource(e.Source);
            }
        }
示例#2
0
 /// <summary>
 /// Called before the <see cref="GotFocus"/> event occurs.
 /// </summary>
 /// <param name="e">The event args.</param>
 protected virtual void OnGotFocus(GotFocusEventArgs e)
 {
     IsFocused = e.Source == this;
 }
示例#3
0
        /// <inheritdoc/>
        protected override void OnGotFocus(GotFocusEventArgs e)
        {
            base.OnGotFocus(e);

            if (e.NavigationMethod == NavigationMethod.Directional)
            {
                e.Handled = UpdateSelectionFromEventSource(
                    e.Source,
                    true,
                    (e.InputModifiers & InputModifiers.Shift) != 0);
            }
        }
示例#4
0
 protected override void OnGotFocus(GotFocusEventArgs e)
 {
     TextView.ShowCaret();
 }
示例#5
0
 /// <summary>
 /// Called before the <see cref="GotFocus"/> event occurs.
 /// </summary>
 /// <param name="e">The event args.</param>
 protected virtual void OnGotFocus(GotFocusEventArgs e)
 {
     IsFocused = e.Source == this;
 }
示例#6
0
 /// <summary>
 /// Called when the <see cref="MenuItem"/> recieves focus.
 /// </summary>
 /// <param name="e">The event args.</param>
 protected override void OnGotFocus(GotFocusEventArgs e)
 {
     base.OnGotFocus(e);
     IsSelected = true;
 }