Esta documentación está archivada y no tiene mantenimiento.

ButtonBase.IsPressed (Propiedad)

Gets a value that indicates whether a ButtonBase is currently activated.

Espacio de nombres: System.Windows.Controls.Primitives
Ensamblado: PresentationFramework (en presentationframework.dll)
Espacio de nombres XML:

public bool IsPressed { get; }
/** @property */
public boolean get_IsPressed ()

public function get IsPressed () : boolean

No se puede utilizar esta propiedad en XAML.

Valor de propiedad

true if the ButtonBase is activated; otherwise false. The default is false.

IsPressed is the state of a button that indicates the left mouse button or space key is pressed over the button.

This example shows how to use the IsPressed property in a trigger style.

<Style x:Key="Triggers" TargetType="Button">
    <Trigger Property="IsMouseOver" Value="true">
        <Setter Property = "Background" Value="Red"/>
    <Trigger Property="IsPressed" Value="true">
        <Setter Property = "Foreground" Value="Green"/>

Microsoft .NET Framework 3.0 es compatible con Windows Vista, Microsoft Windows XP SP2 y Windows Server 2003 SP1.

.NET Framework

Compatible con: 3.0