> 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
