Skip to main content

Getting Started

Getting Started

The Modus MAUI components package is hosted publicly through the nuget.org

Installation

  1. In your dotnet MAUI application, right click on the Dependencies -> Manage Nuget Packages and search and choose the Trimble.Modus.Components and click the Add Package

Here’s the direct link: Trimble.Modus.Components

  1. Add the following using statement in your MauiProgram:
using Trimble.Modus.Components.Hosting;

  1. Then register the handlers to use the Modus components
public static class MauiProgram
{
    public static MauiApp CreateMauiApp()
    {
        var builder = MauiApp.CreateBuilder();
        builder
            .UseMauiApp<App>()
            .UseTrimbleModus()
            // register other handlers
        return builder.Build();
    }
}

Now you can use the controls in your app.

  1. For Windows application, add the following in Platform/Windows/App.xaml file.
 <maui:MauiWinUIApplication.Resources>
      <Thickness x:Key="TextControlBorderThemeThickness">0</Thickness>
      <Thickness x:Key="TextControlBorderThemeThicknessFocused">0</Thickness>  
  </maui:MauiWinUIApplication.Resources>

Usage

  1. Add the NuGet to the project as discussed in the above reference section.
  2. Add the namespace as shown in the following code sample: xmlns:modus="http://modus.trimble.com/components"
  3. Use the controls inside the ContentPage. E.g.
<modus:TMButton Text="Click Me!"
                LeftIconSource="email.png"
                Clicked="TMButton_Clicked" />

For more details about controls, visit each control’s respective documentation under the components section.

Last updated May 20, 2024.