menu

Class KeyTipService - WinUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class KeyTipService

    Represents a service that provides properties to enable and manage KeyTips in WinUI Ribbon control.

    Inheritance
    System.Object
    KeyTipService
    Namespace: Syncfusion.UI.Xaml.Ribbon
    Assembly: Syncfusion.Ribbon.WinUI.dll
    Syntax
    public class KeyTipService : DependencyObject

    Fields

    AccessTextProperty

    Identifies the AccessText dependency property.

    Declaration
    public static readonly DependencyProperty AccessTextProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    EnableKeyTipProperty

    Identifies the EnableKeyTip dependency property.

    Declaration
    public static readonly DependencyProperty EnableKeyTipProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    LauncherButtonAccessTextProperty

    Identifies the LauncherButtonAccessText dependency property.

    Declaration
    public static readonly DependencyProperty LauncherButtonAccessTextProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    Methods

    GetAccessText(DependencyObject)

    Gets the value of the AccessText attached property for the specified element.

    Declaration
    public static string GetAccessText(DependencyObject obj)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.DependencyObject obj

    The object from which the property value is read.

    Returns
    Type Description
    System.String

    The objects’ AccessText property value.

    GetEnableKeyTip(DependencyObject)

    Returns the value of the EnableKeyTip attached property for the SfRibbon element.

    Declaration
    public static bool GetEnableKeyTip(DependencyObject obj)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.DependencyObject obj

    The object from which the property value is read.

    Returns
    Type Description
    System.Boolean

    The object's EnableKeyTip property value.

    GetLauncherButtonAccessText(DependencyObject)

    Gets the value of the LauncherButtonAccessText attached property for the launcher button element in a RibbonGroup.

    Declaration
    public static string GetLauncherButtonAccessText(DependencyObject obj)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.DependencyObject obj

    The object from which the property value is read.

    Returns
    Type Description
    System.String

    The objects’ LauncherButtonAccessText property value.

    SetAccessText(DependencyObject, String)

    Sets the value of the AccessText attached property for the specified element.

    Declaration
    public static void SetAccessText(DependencyObject obj, string value)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.DependencyObject obj

    The object to which the attached property is written.

    System.String value

    The value to set.

    Remarks

    The backstage menu button's AccessText can be set in the RibbonBackstage class. The dependency object element can have a maximum of three keytip characters. If it is exceeded, an exception can be thrown. Avoid using the same KeyTip access text setting on multiple elements in the same layer collection. Furthermore, do not use the same first letter for the single, double, and triple access text elements like F, FP, and FPF in the same layer collection.

    Examples
     RibbonButton ribbonButton = new RibbonButton() { Content = "Copy", Icon = new SymbolIcon() { Symbol = Symbol.Copy } };
     KeyTipService.SetAccessText(ribbonButton, "C");

    SetEnableKeyTip(DependencyObject, Boolean)

    Sets the value of the EnableKeyTip attached property for the SfRibbon element.

    Declaration
    public static void SetEnableKeyTip(DependencyObject obj, bool value)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.DependencyObject obj

    The object to which the attached property is written.

    System.Boolean value

    The value to set.

    Remarks

    The KeyTipService can be enabled for ribbon by defining the EnableKeyTip attached property in SfRibbon class.

    SetLauncherButtonAccessText(DependencyObject, String)

    Sets the value of the LauncherButtonAccessText attached property for the launcher button element in a RibbonGroup.

    Declaration
    public static void SetLauncherButtonAccessText(DependencyObject obj, string value)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.DependencyObject obj

    The object to which the attached property is written.

    System.String value

    The value to set.

    Remarks

    The KeyTip for launcher button can be enabled by defining the LauncherButtonAccessText attached property in RibbonGroup class. Also, if the ShowLauncherButton property is set to true, a KeyTip will be displayed.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved