Category: fundamentals

  • MAUI Fontawesome Integration

    Download FontAwesome Let’s start with downloading Fontawesome font file from https://fontawesome.com/v5/download Add the Font File to Your Project Place the Font File: Register the Font in MauiProgram.cs In MauiProgram.cs register your custom font so that it can be used in your whole application. Below code save into a new file named IconResources.xaml or whatever you…

  • MAUI Secure Storage

    Built-In Secure Data Storage .NET MAUI built-in Secure Storage feature is for securely storage of sensitive data. It stores data securely using platform specific security features. For example: Secure Storage is primarily used to save data like: Saving to Secure Storage Using the SecureStorage.SetAsync() method you save data into Secure Storage. Here is a simple…

  • MAUI Application Data Storage

    Storing application data in .NET MAUI is necessary to maintaining state, saving user preferences or to manage data between application sessions. The type of data and the required persistence determines how it is stored. Below are several approaches to storing data in a .NET MAUI application: .NET MAUI Data Storage Options Preferences for simple key…

  • MAUI Publish/Subscribe messaging

    With MessagingCenter or WeakReferenceMessenger in .NET MAUI you can use those to let your app parts, like ViewModels, Views or services, communicate without them having a reference to each other. It is called Publish/ Subscribe messaging. There are two primary Publish/Subscribe Messaging Method for .NET MAUI Now we will explore both methods with examples. 1.…

  • MAUI Gesture Detection Part-2

    I’ll explain the key gestures you can use in MAUI, and then I’ll go through an example covering: They are implemented in .NET MAUI by using GestureRecognizers. .NET MAUI GestureRecognizers Define the User Interface in XAML MainPage.xaml MainPage.xaml.cs(Handle Gesture Events in Code-Behind) Tap Gesture (OnLabelTapped): Pinch Gesture (OnPinchUpdated): Swipe Gesture (OnBoxViewSwiped): Pan Gesture (OnPanUpdated): Further…

  • MAUI Gesture Detection Part-1

    Gesture detection in .NET MAUI helps you build dynamic, interactive user interfaces which respond to the user’s gestures like swipes, taps, and pinches. Topics Covered I will create a page where: Setting Up the ViewModel I will have a ViewModel that will hold a list Items that the users can interact with. GestureViewModel.cs Creating the…

  • MAUI Creating Custom Attached Properties

    Custom attached properties are a powerful way to extend existing controls with new properties not part of the control basic definition in .NET MAUI. It also gives you the ability to create your reusable behaviors or styles that you can add to multiple different elements in your app. Attached Properties Overview Adding a Custom BorderColor…

  • MAUI Creating Custom Bindable Properties

    When creating custom controls that use databinding in n .NET MAUI it’s useful to create custom bindable properties. Custom controls can participate in XAML based data binding like any other UI control using Bindable properties. Custom Bindable properties overview A bindable property allows you to: With the BindableProperty class we create a bindable property which…

  • MAUI Data Binding

    In .NET MAUI, data binding allows us to connect UI elements to data sources for the data to be automatically bound when changes made on the source are reflected on the UI. It’s very important when you’re creating complex applications as it makes your UI much more dynamic and easy to manage. Let’s build a…

  • MAUI Application Lifecycle

    In.NET MAUI, an application’s lifecycle management has a critical role in the application’s usage for the users. The application’s life cycle involves several events that occur as state transitions from one state to another such as when an app is started, stopped, resumed or destroyed. These lifecycle events are platform agnostic, let you create this…