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:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

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">
    <Style.Triggers>
    <Trigger Property="IsMouseOver" Value="true">
        <Setter Property = "Background" Value="Red"/>
    </Trigger>
    <Trigger Property="IsPressed" Value="true">
        <Setter Property = "Foreground" Value="Green"/>
    </Trigger>
    </Style.Triggers>
</Style>

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
Mostrar: