Stylus.GetIsPressAndHoldEnabled(DependencyObject) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient la valeur de la IsPressAndHoldEnabled propriété jointe sur l’élément spécifié.
public:
static bool GetIsPressAndHoldEnabled(System::Windows::DependencyObject ^ element);
[System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))]
public static bool GetIsPressAndHoldEnabled(System.Windows.DependencyObject element);
[<System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))>]
static member GetIsPressAndHoldEnabled : System.Windows.DependencyObject -> bool
Public Shared Function GetIsPressAndHoldEnabled (element As DependencyObject) As Boolean
Paramètres
- element
- DependencyObject
UIElement Ou ContentElement sur laquelle déterminer si la pression enfoncée est activée.
Retours
true si l’élément spécifié a activé la pression et la mise en attente ; sinon, false.
- Attributs
Exemples
L’exemple suivant montre comment activer l’activation d’une pression et d’une mise en attente sur un Slider. Cet exemple suppose qu’il existe un Slider appelé horizontalSlider1.
if (!Stylus.GetIsPressAndHoldEnabled(horizontalSlider1))
{
Stylus.SetIsPressAndHoldEnabled(horizontalSlider1, true);
}
If Not Stylus.GetIsPressAndHoldEnabled(horizontalSlider1) Then
Stylus.SetIsPressAndHoldEnabled(horizontalSlider1, True)
End If