# PreventDefault()

> Indicates whether the default actions are prevented from being executed for this event.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

> **Warning:**
>
> **Deprecated.** Use StopPropagation and/or FocusController.IgnoreEvent. Before proceeding, make sure you understand the latest changes to UIToolkit event propagation rules by visiting Unity's manual page [https://docs.unity3d.com/Manual/UIE-Events-Dispatching.html](https://docs.unity3d.com/Manual/UIE-Events-Dispatching.html)

```csharp
public void PreventDefault()
```
