> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/xamarin/basic-operations/basics/tools/set-tool-to-toolmanager.md).

# Change & set default tool mode

Learn how to set up the ToolManager in Xamarin.Android with this tutorial. Discover how to change the default Pan Tool using ToolManager.setTool(ToolManager.Tool) API. Explore more here! The Apryse Xa

{% hint style="info" %}
**This tutorial only applies to Xamarin.Android. See Xamarin.iOS equivalent here .**
{% endhint %}

When setting up the [`ToolManager`](https://sdk.apryse.com/api/xamarinandroid/tools/api/pdftron.PDF.Tools.ToolManager.html), the default [`Tool`](https://sdk.apryse.com/api/xamarinandroid/tools/api/pdftron.PDF.Tools.Tool.html) is the [`Pan`](https://sdk.apryse.com/api/xamarinandroid/tools/api/pdftron.PDF.Tools.Pan.html) Tool. To change the tool, use [`ToolManager.setTool(ToolManager.Tool)`](https://sdk.apryse.com/api/xamarinandroid/tools/api/pdftron.PDF.Tools.ToolManager.html#pdftron_PDF_Tools_ToolManager_Tool) API.

For example, to switch to the Text Highlighting tool, do the following:

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
mToolManager.Tool = mToolManager.CreateTool(ToolManager.ToolMode.TextHighlight, mToolManager.Tool);
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}
{% code lineNumbers="true" %}

```java
mToolManager.setTool(mToolManager.createTool(ToolMode.TEXT_HIGHLIGHT, mToolManager.getTool()));
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code lineNumbers="true" %}

```kotlin
mToolManager.tool = mToolManager.createTool(ToolMode.TEXT_HIGHLIGHT, mToolManager.tool)
```

{% endcode %}
{% endtab %}
{% endtabs %}

To continuously using the same tool, do:

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
var tool = mToolManager.CreateTool(ToolManager.ToolMode.TextHighlight, mToolManager.Tool);
((Tool) tool).ForceSameNextToolMode = true;
mToolManager.Tool = tool;
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}
{% code lineNumbers="true" %}

```java
Tool tool = mToolManager.createTool(ToolMode.TEXT_HIGHLIGHT, mToolManager.getTool())
((Tool) tool).setForceSameNextToolMode(true)
mToolManager.setTool(tool);
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code lineNumbers="true" %}

```kotlin
val tool = mToolManager.createTool(ToolMode.TEXT_HIGHLIGHT, mToolManager.tool)
(tool as Tool).isForceSameNextToolMode = true
mToolManager.tool = tool
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/xamarin/basic-operations/basics/tools/set-tool-to-toolmanager.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
