Stylus.GetIsPressAndHoldEnabled(DependencyObject) Metoda

Definice

Získá hodnotu IsPressAndHoldEnabled připojené vlastnosti v zadaném elementu.

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

Parametry

element
DependencyObject

A UIElement nebo ContentElement na kterém určíte, zda je povoleno stisknutí a podržení.

Návraty

truepokud zadaný prvek má stisknutí a podržení povoleno; v opačném případě . false

Atributy

Příklady

Následující příklad ukazuje, jak povolit stisknutí a podržení na Slider. V tomto příkladu se předpokládá, že existuje Slider s názvem horizontalSlider1.

if (!Stylus.GetIsPressAndHoldEnabled(horizontalSlider1))
{
    Stylus.SetIsPressAndHoldEnabled(horizontalSlider1, true);
}
If Not Stylus.GetIsPressAndHoldEnabled(horizontalSlider1) Then
    Stylus.SetIsPressAndHoldEnabled(horizontalSlider1, True)
End If

Platí pro