# Password

If we try to data-bind the Password property of a PasswordBox control we end up with an error because the Password property cannot be bound due to the fact that is not a dependency property (mainly for security reasons).

In those cases you can take advantage of the PasswordBoxBehavior in the following manner:

```markup
<PasswordBox>
    <i:Interaction.Behaviors>
        <behaviors:PasswordBoxBehavior Text="{Binding Path=MyPasswordProperty}" />
    </i:Interaction.Behaviors>
</PasswordBox>
```

where the behaviors xml namespace is defined as: `http://schemas.topics.it/wpf/radical/windows/behaviors`. In the same namespace is also defined a `Password` attached property that exposes exactly the same behaviors.

The password behavior, and the attached property too, exposes also a `Command` property useful to bind a command to the “enter” key when the `PasswordBox` is focused.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.radicalframework.com/release-1/behaviors/password.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
