Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 1.14 KB

uielement_keytiptarget.md

File metadata and controls

46 lines (36 loc) · 1.14 KB
-api-id -api-type
P:Microsoft.UI.Xaml.UIElement.KeyTipTarget
winrt property

Microsoft.UI.Xaml.UIElement.KeyTipTarget

-description

Gets or sets a value that indicates the element targeted by the access key Key Tip.

-property-value

The element targeted by the Key Tip.

-remarks

The KeyTipPlacementMode property is used to specify the location of the access key Key Tip relative to the boundary of the targeted element.

-examples

In this example, we specify the access key for a Grid element, but we target the text heading of the Grid.

<StackPanel> 
  <TextBlock x:Name="Heading1">Heading 1</TextBlock> 
  <Grid 
    AccessKey="1" 
    AccessKeyInvoked="Invoke1" 
    KeyTipTarget="{x:Bind Heading1}"> 
      <!-- ... -->
  </Grid> 

  <TextBlock x:Name="Heading2">Heading 2</TextBlock> 
    <Grid 
      AccessKey="2" 
      AccessKeyInvoked="Invoke2" 
      KeyTipTarget="{x:Bind Heading2}"> 
        <!-- ... --> 
    </Grid> 
</StackPanel>  

-see-also

KeyTipPlacementMode