Stylus.GetIsPressAndHoldEnabled(DependencyObject) Método

Definição

Obtém o valor da IsPressAndHoldEnabled propriedade associada no elemento especificado.

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

Parâmetros

element
DependencyObject

A UIElement ou ContentElement onde determinar se o press and hold está ativado.

Devoluções

true se o elemento especificado tiver pressionado e manter ativado; caso contrário, false.

Atributos

Exemplos

O exemplo seguinte demonstra como ativar o press and hold num Slider. Este exemplo assume que existe um Slider chamado horizontalSlider1.

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

Aplica-se a