Posts

Showing posts with the label #xamarin

Xamarin Tutorial Part 5 - Grid in xaml

Image
In Previous blog  we learn syntax of grid, we will go through example of grid in xaml. Grid code in xamarin form in xaml Please, support my blog by clicking on our sponsors ad! Grid code for above design <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="GridExample.MainPage"> <Grid RowDefinitions="Auto,Auto,Auto,Auto,Auto,*" ColumnDefinitions="Auto,Auto,Auto,Auto,*"> <BoxView BackgroundColor="Black" Grid.Row="0" Grid.Column="0"></BoxView> <BoxView BackgroundColor="Gray" Grid.Row="1" Grid.Column="0"></BoxView> <BoxView BackgroundColor="Green" Grid.Row="2" Grid.Column="0" ></BoxView> <BoxView BackgroundColor="Yellow" Grid.Row="3" Grid.C

Xamarin Tutorial Part -3 (How to add control)

Image
Please, support my blog by clicking on our sponsors ad!  Let's learn how to add control in XAML and code In below code, contentpage is content " [ Xamarin.Forms.ContentProperty( "Content" ) ]".  This is a page which display single view. It means that it will hold only one control. The code will be as follow: <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="LoginUIDesigns.Views.Login.MyFirstPage"> <ContentPage.Content> <Label Text="Welcome to Xamarin.Forms!" TextColor="Black" VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand" /> </ContentPage.Content> </ContentPage> Let see how we can write this code in code behind file. public partial class MyFirstPage : ContentPage {

Xamarin Tutorial Part - 2 (Create your first project.)

Image
How to create first xamarin form application?   Please, support my blog by clicking on our sponsors ad! Follow step to create xamarin aaplication. (I am using visual studio 2019) Explain in this video 1) Click on create a new project option 2) Select Mobile App (Xamarin.Forms) then click on next button. 3) Give Project name for your application, then select location, then click on create button 4) Select Template, then click on create button. There are three templated: Flyout In this template, there will be hamburger menu, when you click on it, menu will open from left side Tabbed In this template, there will tab in bottom of the application. Blank It will be bank project After clicking on create button, your solution will be created with three project Main Project Xamarin.Android project Xamarin.IOS Project These three are the architecture of the xamarin. Difference between Emulator and Simulator? Emulator: Android virtual device Simulator: IOS virtual device Emulator? I

Xamarin Tutorial Part 1

Image
  Please, support my blog by clicking on our sponsors ad! Xamarin is company started in 2011 who build the software. It is a framework to develop the mobile application using single code. With single code, application build in three platform (Android, IOS, Windows). Most of the platforms are used is android and ios. Please go through this video It support three language c#, f#, vb.net, but most of the developer preferred c#. Xamairn use XAML (Extensible markup language) for visual appearence. Xaml help to design beautiful UI by providing the information like what control to place and where to locate and how to locate. The responsibility of xaml is to create to place the control with proper location. for every xaml, there is c# page. this c# page is a class which define behaviour of the page for example what to perform action when button is clicked, to provide data to UI page, etc. Architecture The architecture of the xamarin projects are Xamarin Main project Xamarin.Android Xamar

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

How do I create a UI dashboard For School App? Xamarin Forms makes it easy to create an app that can target Android, iOS, and Windows.

Image
How do I create a UI dashboard? Please, support my blog by clicking on our sponsors ad! There are also available for another design for School APP. Links are as follow: https://xamarinuidesigns.blogspot.com/2022/03/school-ui-design-using-xamarin-form.html https://xamarinuidesigns.blogspot.com/2022/03/school-ui-design-fees-gallery-profile.html https://xamarinuidesigns.blogspot.com/2022/03/school-ui-design-using-xamarin-form_10.html https://xamarinuidesigns.blogspot.com/2022/03/school-ui-design-using-xamarin-form_4.html Fontawesome: https://xamarinuidesigns.blogspot.com/2022/02/create-font-awesome-icon-in-xamarin-form.html  Please watch this video  to understand code. First we will create Template. ImageButton.xaml <ContentView xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="SchoolUIDesigns.Control.ImageButton"> <Conten

How to send Firebase Push Notification through API

Image
  Please, support my blog by clicking on our sponsors ad! In this blog  we learn how to send push notification. Now we will see how to send Notification using API. Create Server Key in Console firebase Call following API to send push notification URL:  https://fcm.googleapis.com/fcm/send Method: POST Headers: Authorization: key=server key (you can get it from firebase console) Content-Type: application/json Body { "to" : "FCM Token goes here", "notification" : { "body" : "New Lesson Added 1", "title": "Lokesh" } } Hope you understand this, Please share your feedback and enjoy coding.

Razor Pay using xamarin form (only for Android)

Image
  Razor Pay using xamarin form Please, support my blog by clicking on our sponsors ad! Code is Explain in this video To integrate razor pay in Xamarin, follow below steps: Create account in Razorpay. Create key in Razorpay, later will use for implementing Razorpay gateway in Xamarin form. Create Account in Razorpay. Create account in Razorpay Create account in Razorpay . Create Key in Razorpay. Go to setting in left menu and generate key Generate key in razor pay Generate key in razor pay Now we code in Xamarin to implement Razorpay. Download RazorpayBindingforxamarin.dll  and reference to android project. Razorpay in xamarin form Mainactivity.cs Add Namespace using Com.Razorpay; and declare variable RazorResponseViewModel responseViewModel = new RazorResponseViewModel(); In OnCreate method after LoadApplication(new App()) line add below code: MessagingCenter.Subscribe<RazorResponseViewModel>(this, "PayNow", (payload) => {