Posts

Showing posts from September, 2022

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 = "",