Posts

.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 views

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 window a

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.MoveToRegion(mapSpan);

Nested Template Using MVVM - Xamarin Form

Image
Nested Template MVVM - Xamarin Form Please, support my blog by clicking on our sponsors ad! Code is explain in this video SkillTemplate.xaml <ContentView xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:vm="clr-namespace:MVVMDemo.ViewModels" x:Class="MVVMDemo.Views.ListTemplate.SkillTemplate"> <ContentView.Content> <StackLayout x:DataType="vm:TechnicalSkill" Padding="0,10"> <Label Text="{Binding Name}" TextColor="Black"/> </StackLayout> </ContentView.Content> </ContentView> EducationTemplate.xaml <ContentView xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:vm="clr-namespace:MVVMDemo.ViewModels" x:C

Login Page - MVVM in xamarin Form

Image
Mvvm in xamarin forms There are three core components in the MVVM pattern: the model, the view, and the view model. Please, support my blog by clicking on our sponsors ad! For more info please refer this microsoft  link . Code is explain in this video We will see mvvm for Login First we will create BaseViewModel.cs BaseViewModel.cs public class BaseViewModel : INotifyPropertyChanged { // public IDataStore<Item> DataStore => DependencyService.Get<IDataStore<Item>>(); bool isBusy = false; public bool IsBusy { get { return isBusy; } set { SetProperty(ref isBusy, value); } } string title = string.Empty; public string Title { get { return title; } set { SetProperty(ref title, value); } } protected bool SetProperty<T>(ref T backingStore, T value, [CallerMemberName] string propertyName = "",

Snackbar and BottomSheet in xamarin form

Image
Snackbar and bottomsheet in xamarin form Please, support my blog by clicking on our sponsors ad!  Today we are going to learn about snackbar and bottomsheet. Code is explain in this video First install Snackbar and bottomsheet nugget in all the project of the solution. Snackbar nugget : Xamarin.CommunityToolkit bottomsheet nugget: Plugin.BottomSheet Below code is for snackbar: For snackbar write below code any event for eg: (on button click, listview itemselected, etc) var actions = new SnackBarActionOptions { Action = () => DisplayAlert("Snackbar Ex!", "Yes button clicked", "OK"), Text = "Yes" }; var options = new SnackBarOptions { MessageOptions = new MessageOptions { Foreground = Color.White, Message = "Click yes button.&quo

Splash screen Like Swiggy App

Image
  Splash screen like swiggy app Please, support my blog by clicking on our sponsors ad! Create splashscreen Code explain in this video LandingPage.xaml <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="SwiggyAppDesign.Views.LandingPage" BackgroundColor="white"> <ContentPage.Content> <Grid RowDefinitions="*" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Padding="20"> <Grid x:Name="grid" Grid.Row="0" RowSpacing="20" RowDefinitions="Auto,Auto,Auto,Auto" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"> <Image Grid.Row="0" x:Name="imgLocation" Source="https://encrypted-t