Posts

Showing posts with the label .net maui

Add Google Login to .NET MAUI in Just 10 Minutes

Image
🔐 Sign In with Google in .NET MAUI (Android & iOS) – A Step-by-Step Guide Adding Google Sign-In to your .NET MAUI app is one of the most powerful ways to give users secure and seamless access. In this blog post, we’ll go from zero to working implementation , using a shared codebase that works on both Android and iOS . This guide includes: Google API setup (with critical save steps) Android/iOS redirect configuration MAUI WebAuthenticator usage Fully working code Join our exclusive WhatsApp group for Xamarin and .NET MAUI developers to connect with experts, share insights, and get help with your projects. Whether you're a beginner or an experienced developer, this group is the perfect place to enhance your skills and collaborate with the community. Please, support my blog by clicking on our sponsors ad! 🎯 Objective We want a single Login with Google button that: Launches Google sign-in Authenticates the user Returns an authorizati...

.NET MAUI – The Complete Beginner's Guide

Getting Started with .NET MAUI – The Complete Beginner's Guide NET MAUI (Multi-platform App UI) is a framework developed by Microsoft that allows you to build native applications for Android, iOS, macOS, and Windows using a single codebase written in C#. It is the evolution of Xamarin.Forms, reimagined to be more powerful, flexible, and modern. In today's fast-paced development world, learning one technology that lets you target multiple platforms is a huge advantage. .NET MAUI is that one technology. Whether you're just getting started in mobile development or you’re aiming to crack a job interview, this guide is designed to walk you through everything you need to become confident with .NET MAUI—from setting up your environment to building real apps. This is not just another quick-start guide. By the end of this tutorial, you'll not only be able to build and publish cross-platform apps—you’ll also be ready for real-world interviews and freelance pro...

Managing Xcode Versions for Xamarin and .NET MAUI on macOS

Image
Why Do You Need Two Xcode Versions? Xamarin: Many Xamarin projects rely on older Xcode versions for compatibility. For instance, Xamarin might require Xcode 15 or earlier for building iOS applications. .NET MAUI: The latest versions of .NET MAUI require Xcode 16 or higher to ensure compatibility with the latest iOS SDKs. Since macOS does not allow simultaneous use of multiple Xcode installations without manual intervention, switching between versions becomes necessary. Please, support my blog by clicking on our sponsors ad! Installing and Managing Two Xcode Versions Step 1: Download the XcodesApp Visit the release page for XcodesApp v2.4.1b30 . ...

Migrating from Xamarin to .NET MAUI: ScrollView Considerations

Image
Migrating from Xamarin to .NET MAUI: ScrollView Considerations When migrating your Xamarin application to .NET MAUI (Multi-platform App UI), developers often encounter subtle differences in how certain controls behave. One such difference lies in the implementation of the ScrollView control. In this blog post, we'll explore a crucial aspect of using ScrollView in .NET MAUI, focusing on the importance of setting the correct VerticalOptions for proper functionality. Join our exclusive  WhatsApp group for Xamarin and .NET MAUI developers  to connect with experts, share insights, and get help with your projects. Whether you're a beginner or an experienced developer, this group is the perfect place to enhance your skills and collaborate with the community. The ScrollView Challenge In Xamarin.Forms, ScrollView typically worked as expected without much additional configuration. However, when migrating to .NET MAUI, you might notice that your ScrollView isn't fun...

Create PopUp in .Net MAUI

Image
Popup in .net Maui Please, support my blog by clicking on our sponsors ad! Popups are an integral part of user interface design, allowing developers to convey information and interact with users in a more engaging manner. In .NET MAUI, there are three main types of popups available: DisplayAlert, DisplayPrompt, and Plugin.Maui.Popup. In this blog post, we will dive into each of these popup types, explore their functionalities, and provide code examples to demonstrate their usage. DisplayAlert: Simple and Informative Popups DisplayAlert is a built-in feature in .NET MAUI that provides a straightforward way to display alert popups to users. These popups typically present important messages, notifications, or warnings that require user acknowledgement. Here's an example of how to use DisplayAlert in your .NET MAUI application: DisplayAlert("Display Alert", "Welcome to DotNet Maui", "OK","Cancel",FlowDirection.RightToLeft); In the co...

Animation in .net MAUI

Image
 Animation will add more good looking UI of the mobile application. Let's see how to add animation using lottie file. Lottie is a mobile library for andriod and IOS that prases Adobe After Effects animations exported as JSON. Lottie Animation in .NetMaui You can go through the lottie website. This lottie provide pently of cool animation and also you can create own animation. Please, support my blog by clicking on our sponsors ad! Let's get started First add install "SkiaSharp.Extended.UI.MAUI" in your project using nugget manager. This nugget is prerelease so please check "Include Prerelease". Lottie animation in .net Maui Next step is to Bootstrap Skiasharp plugin in MAUIProgram file and add UseSkiaSharp() to the app builder.  Below is the code: public static class MauiProgram { public static MauiApp CreateMauiApp() { var builder = MauiApp.CreateBuilder(); builder ...

XAML Files

Image
 XAML stands for E x tensible A pplication M arkup L anguage. When project is created you can see the maui project structure In this project, there are xaml file(App.xaml,AppShell.xaml,MainPage.xaml) each of this page support xaml language and when you expand it, each will have associated cs file.      In each contentpage of Maui Project, you observe some code at starting of the page xmlns is used for binding namespace. "http://schemas.microsoft.com/dotnet/2021/maui" is an namespace which is version identifier which contain certain information If you remove this line then it will throw error. blue lines says that there is an error. this is because namespace has been removed  The xmlns:x attribute indicates an additional XAML namespace, which maps the XAML language namespace.It define some xaml element. Using x we can use some element like x:class,x:name etc. x:class define the name of the class the use in code behind. Hope this is helpful to you. please ...

Introduction to .NET MAUI: Building Cross-Platform Applications with .NET and C#

Image
 .NET MAUI stands for .NET Multi-platform App UI, which is a UI framework that allows developers to create cross-platform applications for iOS, Android, Windows, and macOS using .NET and C# programming language. It is an evolution of the Xamarin.Forms framework and is built on top of .NET 6 Introduction: In today's world, businesses need to create applications that run on multiple platforms to reach a wider audience. However, building applications for different platforms can be a time-consuming and complicated process. This is where .NET MAUI comes in. .NET MAUI allows developers to create cross-platform applications for iOS, Android, Windows, and macOS using .NET and C# programming language. What is .NET MAUI? .NET MAUI is a UI framework that enables developers to create cross-platform applications using a single codebase. It is built on top of .NET 6 and is an evolution of the Xamarin.Forms framework. With .NET MAUI, developers can create native applications that run on multiple ...

.NET MAUI Handler

Image
  Before learning.net maui handler you should know about .Net MAUI . Please, support my blog by clicking on our sponsors ad! This is explain in this video In xamarin forms, we are using renderer to customize the controls, this renderers are code in all project to update the property, but now .net MAUI has come with single project so it is providing handler to customize the control, so we are using handler instead of renderer in .net maui. What is Handler and Mappers? Mappers Mappers are a key concept in .NET MAUI handlers, usually providing a property mapper and sometimes a command mapper, which maps the cross-platform control’s API to the native view’s API. This mappers used dictionary to store the data. Handler It is a concept of maping cross platform control to native controls. Each control has an interface, each control that implement interface is called virtual views. Handler map this virtual views to control of each platform control which is known as native v...

What is .Net MAUI?

Image
  watch video to understand. Please, support my blog by clicking on our sponsors ad! Let's learn have some basic knowledge about .NET MAUI. Today we look for following: What is .Net MAUI? Difference between Xamarin and .Net MAUI Why Xamarin Obsolete? How to install .Net MAUI? What is .Net MAUI? .Net Maui is a evolution of xamarin forms with better performance and extensibility .Net MAUI is a cross platform framework where you are allow to create mobile apps (IOS,android,window) and also window app and MacOS with single codebase with c# and xaml. It will share UI layout, Code, Test, Buisiness logic. .Net MAUI support Hot reload which allow you to modify source code while app is running. Difference between Xamarin and .Net MAUI? You will notice that there will many similarity in xamarin and .net MAUI like controls,layout,shell,guesture,template,cross platform api. .Net maui is faster than xamarin  .Net maui allow you to develop andoid,ios,macos and win...

Maps in .NET MAUI

Image
  Please, support my blog by clicking on our sponsors ad! .NET MAUI in .NET 7 Release Candidate 1 release on september 20, 2022 .Net MAUI provide map control with the nugget " Microsoft . Maui . Controls . Maps ". his control is ideal for displaying and annotating maps using the native maps from each mobile platform. You can draw shapes on the map, drop pins, add custom pins, and even geocode street addresses, latitude, and longitude. To use the map control, add the NuGet package and initialize the control in your MauiProgram. To initialize the control, add  . UseMauiMaps ()  in your  MauiProgram  builder and then add the  Map  control to your view. <Map x:Name = "map" /> protected override void OnNavigatedTo(NavigatedToEventArgs args) { base.OnNavigatedTo(args); var hanaLoc = new Location(20.7557, -155.9880); MapSpan mapSpan = MapSpan.FromCenterAndRadius(hanaLoc, Distance.FromKilometers(3)); map.MoveToReg...