UIElement.KeyboardAcceleratorPlacementTarget Property


Gets or sets a value that indicates the control tooltip that displays the accelerator key combination.

 property DependencyObject ^ KeyboardAcceleratorPlacementTarget { DependencyObject ^ get(); void set(DependencyObject ^ value); };
DependencyObject KeyboardAcceleratorPlacementTarget();

void KeyboardAcceleratorPlacementTarget(DependencyObject value);
public DependencyObject KeyboardAcceleratorPlacementTarget { get; set; }
Public Property KeyboardAcceleratorPlacementTarget As DependencyObject

Property Value


The control tooltip that displays the accelerator key combination.


<Grid x:Name="Container">

    <Button Content="Click" 
        ToolTipService.PlacementTarget="{x:Bind Container}" 
        KeyboardAcceleratorPlacementTarget="{x:Bind Container}">
            <KeyboardAccelerator Key="S" Modifiers="Control"/>


In some cases, you might need to present a tooltip relative to another element (typically a container object).

Here, we show how to use the KeyboardAcceleratorPlacementTarget property to display the keyboard accelerator key combination for a Save button with the Grid container instead of the button.

<Grid x:Name="Container">

  <Button Content="Save" Click="OnSave">
      <KeyboardAccelerator  Key="S" Modifiers="Control" 
        KeyboardAcceleratorPlacementTarget="{x:Bind Container}"/>



Use the KeyboardAcceleratorPlacementMode property to specify whether the control tooltip displays the key combination for it's associated keyboard accelerator.

Applies to

See also