
Learn how Xamarin Forms lets you build native iOS, Android, and Windows apps from a single C# code base, using XAML for UI and code-behind for behavior.
Create a Xamarin Forms app in Visual Studio using a portable class library, with six projects, and run on Android emulators or iOS simulators via a Mac agent.
Create a new greet page with a centered button in Xamarin Forms, handle the click to show an alert using DisplayAlert, and set GreetPage as the app's startup page.
Learn how XAML, an XML-based language, defines the visual appearance of our applications. Build a solid foundation by exploring XAML in detail to progress through the course.
Compare XAML and code for building Xamarin forms interfaces, showing how to set a page’s content property with XAML versus code, and why XAML remains cleaner for most layouts.
Learn how the content property restricts a content page to a single view, then use a stacklayout to stack a label and a slider and center them on screen.
Handle the slider's ValueChanged event in code-behind to update the label with the slider's NewValue, using x:Name to reference elements. Format the value to two decimals before displaying.
Bind a label and a box view’s opacity to a slider using markup extensions and x:Reference, then simplify by setting the label’s BindingContext to the slider for cleaner, inherited bindings.
Learn how Xamarin Forms manages device differences by applying iOS-specific top padding with code-behind. Use OnPlatform and Thickness to tailor padding for different platforms in C#.
A few exercises that help you master XAML syntax and the features you've learned in this section.
Learn to use StackLayout in XAML to arrange elements in vertical or horizontal order, applying padding, spacing, and verticalOptions or horizontalOptions to control alignment and fill.
Create a stack layout in code-behind, setting spacing, padding, and orientation, add children, then assign the layout to the page content.
Explore how to position elements with a grid in Xamarin Forms using Grid.Row and Grid.Column. Define row and column definitions, and use ColumnSpan and RowSpan to control sizing.
Create and populate a grid in code with Grid.Children.Add, positioning elements by left and top, and use row/column spans; compare xaml and codebehind for dynamic UIs.
Master absolute layout in xaml to precisely position and overlay elements, using absolute layout bounds and flags, with proportional values for responsive, edge anchoring, and layered box views.
Learn to implement AbsoluteLayout in code by creating an AbsoluteLayout, adding aquaBox, and configuring position, size, and flags with AbsoluteLayout.SetLayoutBounds and AbsoluteLayout.SetLayoutFlags.
Implement a relative layout in code and add aquaBox and silverBox BoxView elements. Apply width and height constraints with RelativeToParent and position the silver box relative to aquaBox via RelativeToView.
Learn to load images from a URL, add images to your app, control caching, show indicators during downloads, embed images for offline use, and render icons with rounded corners.
Learn how to display downloaded images in Xamarin forms using UriImageSource and ImageSource, including from Uri with caching enabled by default, and how to disable caching with custom cache validity.
Adjust image aspect in Xamarin Forms using AspectFit, AspectFill, and Fill to control distortion or cropping. Display an ActivityIndicator while internet images load.
Learn to add an activity indicator in Xamarin.Forms using AbsoluteLayout to center it on the page, set IsRunning, and bind IsRunning to the image's IsLoading with X:Reference.
Learn to embed an image in a Xamarin forms app by adding an images folder, setting the build action to EmbeddedResource, and loading it with ImageSource.FromResource() in code-behind.
Learn to create a custom markup extension, EmbeddedImage, in Xamarin Forms to load embedded images in XAML via a dynamic ResourceId, implementing IMarkupExtension and proper namespace setup.
Learn how to add platform-specific icons to buttons to achieve native look across iOS, Android, and Windows, including resolution naming conventions and using OnPlatform and FileImageSource.
Set and customize application icons for iOS, Android, and Windows in Xamarin Forms, using Xamarin Studio and Visual Studio, with platform-specific icon placeholders, dimensions, and asset paths, plus rounded images.
Display rounded images in Xamarin forms with the image circle plugin, install via NuGet, initialize ImageCircleRenderer on iOS, Android, and Windows, and configure width, height, aspect, and uri source.
Demonstrates using device-independent units to render consistent element sizes across iPhone and Android devices, explains pixel density, and shows how 160 units equal one inch.
Learn to present data in beautiful, interactive lists. Handle selections, display context actions, implement pull to refresh, and add a search bar atop your list.
Create a list of names with a ListView in XAML, populate it in code behind with names like Mosh, John, and Bob, and customize the row separator visibility or color.
Define a contact model with name, status, and imageUrl and display a ListView with an item template binding name, status, and imageUrl using TextCell or ImageCell.
Group items in a list view by letter using a ContactGroup to create M and J groups, with iOS index and bindings to title and short title.
Learn to handle list view selections by comparing ItemSelected and ItemTapped events, using e.SelectedItem to cast to a contact and display an alert. Disable selection by clearing ListView.SelectedItem.
Add a search bar to a list view in Xamarin Forms, set placeholder text, and filter contacts as users type using the text changed event, with optional search button support.
Build a native cross-platform page that mimics Airbnb's recent searches, with location filter, check-in/out dates, and pull-to-refresh, plus delete via context action (Android uses long-press).
Explore hierarchical navigation in Xamarin Forms to move between pages, including master-detail pages, tabs, and carousel pages, with alerts, action sheets, and toolbars.
Implement a simple master detail in Xamarin Forms by navigating from a contacts list to a detail page, passing the contact via the constructor and binding it.
Learn how to implement a master-detail interface in Xamarin Forms using MasterDetailPage, configuring master and detail pages, handling item selection, and adapting for tablet versus phone layouts.
Create tabbed pages in Xamarin Forms by turning the main page into a tabbed page, adding child pages with titles and icons, and wiring them in XAML.
Create and handle pop-up interfaces with alerts and action sheets in Xamarin Forms, using display alert overloads with bool results and display action sheet to capture user choices.
Learn to add toolbar items in a Xamarin Forms app, including icons, text, and activation events. Explore primary versus secondary order and platform-specific appearance with a navigation page.
Learn to accept user input by building forms and settings pages for your Xamarin Forms apps.
Explore the switch control in Xamarin Forms, using IsToggled and the Toggled event to show or hide a label, then bind IsVisible to the switch's IsToggled with x:Reference.
Learn to implement a slider with a bound label, set its minimum and maximum (set maximum first to avoid errors), format the value as an integer, and respond to ValueChanged.
Explore how entry and editor controls capture single and multi-line text in Xamarin forms, with platform-specific visuals, keyboard types, placeholders, and events such as Completed and TextChanged.
Learn to implement a picker in Xamarin Forms to select a contact method, populate items from strings or objects, and handle selection to display the chosen method's name and ID.
Explore date and time pickers in Xamarin Forms, format and constrain dates with minimum and maximum values, handle DateSelected, and initialize to today via x:Static DateTime.Today.
Explore how table view organizes forms with sections and built-in cells such as text cell, entry cell, and switch cell, and implement custom cells like date pickers to capture data.
Create a view cell in a horizontal stack with a label and a date picker, align date picker to the right and center the label, with 13 units of padding.
Learn to create reusable DateCell view cells in Xamarin Forms to respect the DRY principle, by exposing bindable properties and binding them in XAML with a dynamic label.
Implement a picker with navigation to select a contact method (none, SMS, email) using a listview, navigation pages, and item selection handling on the main page.
Build a contact book app in Xamarin forms that demonstrates create, read, update, and delete operations using an in-memory list, with a form for name, phone, and email.
Explore options for storing application data in Xamarin Forms, including application properties, file system, SQLite, and cloud services, with guidance on transient data and Json serialization.
Store and load settings using Xamarin Forms application properties and the Application.Current.Properties dictionary with OnChange handlers. Load on page construction and consider SavePropertiesAsync for long text entries.
Refactor away magic strings by centralizing keys in the application class, expose properties for title and notifications, and use data binding to sync controls with app state.
Design a cross-platform file system with an IFileSystem in a PCL, implement Android and iOS with System.IO and Windows.Storage, and wire via DependencyService and PCL Storage.
Learn to set up sqlite in a Xamarin forms app by adding sqlite-net pcl, implementing an I SQLite DB interface, and obtaining a sqlite async connection on iOS, Android, and Windows.
Use the ISQLiteDb service to create the recipe table and load recipes in OnAppearing. Add, update, delete with InsertAsync, UpdateAsync, DeleteAsync; reflect changes in an observable collection.
Learn how to consume a RESTful service in Xamarin forms using JSONPlaceholder, including fetching posts with HttpClient, deserializing with Newtonsoft.Json, and performing create, update, and delete operations with optimistic update.
Build a Netflix Roulette API powered search app that reveals a list after typing five characters, shows poster, title, year, navigates to movie details page, and handles no-results and errors.
Explore MVVM, the architectural pattern used in XAML-based apps such as Xamarin Forms and WPF, and learn what it is, when to use it. See how to implement MVVM.
Explore the MVVM pattern—Model, View, and ViewModel—highlighting how the ViewModel exposes state via properties like Items and methods like Add, enabling unit testing through POCOs and decoupling from Xamarin.
Extract the playlists view model by moving code from code-behind into PlaylistsViewModel. Replace UI references with data binding and set two-way binding for SelectedItem and ItemsSource in XAML.
Implement INotifyPropertyChanged in a shared BaseViewModel to enable data binding and automatic property updates. Introduce a generic SetValue using ref, EqualityComparer, and CallerMemberName to streamline setters across view models.
Learn how to replace event handlers with an Icommand by binding a command property in the playlists view model, wiring it to XAML through the command attribute and execute method.
Explore implementing an ICommand with parameters in Xamarin Forms, using a generic command for PlayListViewModel, handling async methods with an async lambda, and binding commands in MVVM.
Learn a simple tip to organize a ViewModel by placing private fields at the top, then public properties, the constructor, and private methods to improve cleanliness and maintainability.
Explore unit testing of view models in a Xamarin forms MVVM app by testing add and select playlist behavior, including deselection, toggling favorites, and push navigation with mocks.
Explore how to consolidate repetitive values and styles in XAML, implement loosely coupled apps with Messaging Center, and access device functionality with useful plugins for camera, GPS, battery, and contacts.
Define shared values in a ResourceDictionary to reuse properties like borderRadius and buttonBackgroundColor across pages. Place resources at the application or page level for consistency and performance.
Learn how to use resources and styles in Xamarin Forms to create clean, reusable button appearances with explicit and implicit styles, inheritance, and resource-based theming.
Explore how messaging center enables cross-page communication by publishing and subscribing to slider value changes, eliminating direct references between publisher and subscriber.
Learn to manage events in Xamarin Forms by replacing magic strings with a centralized static Events class. Use a unique identifier like SliderValueChanged for publisher and subscriber to improve maintainability.
With over 13,000 happy students and 2,600+ positive reviews, this course is Udemy's most popular course for learning Xamarin Forms!
Do you have an idea for an app and want to turn that into reality? Well, if you want to build that app for iOS, you need to know Objective-C, which is an old, C-based language. The alternative is to learn Swift. If you want to build the same app for Android, you need to learn Java. And if you want to build this app for Windows, of course you need to know C#.
Sounds like a lot of headache. It's not just about learning different programming languages. It's about the fact that each platform has its own UI framework which is built with a different architecture and API.
Building apps shouldn't be that painful. Is there a better way? Yes there is: Xamarin Forms.
Xamarin Forms is a UI framework for building native cross-platform mobile apps with C#. You code your app only once, and let Xamarin compiler build your app for each platform. As simple as that! You don't need to learn 4 different languages and presentation frameworks!
In this course, Mosh, author of 9 five-star courses on Udemy, will take you on a pragmatic and step-by-step journey and teach you how to build native mobile apps for Android, iOS and Windows using Xamarin Forms and C#.
In particular, you'll:
If you've taken any of Mosh's courses before, you know what you get: clear, concise training, without waffling or mocking around.
You get 7.5 hours of high-quality content and every single minute is crafted with outstanding delivery and world-class production. Mosh doesn't create 10+ hour courses that need to be fast-forwarded or skipped.
This course is packed with real-world examples, exercises and best practices. Not only will you learn how to use Xamarin Forms, you’ll also learn first-class tips to make your code cleaner and more maintainable.
Lectures also have downloadable source code so you can code-along while watching the videos.
So, if you're looking for a Xamarin Forms course with
Don't look further. Enrol in the course now and learn to build native mobile apps for Android, iOS and Windows using your existing C# skills.
PREREQUISITES
All you need to know in order to take this course is C#. At a minimum, you should be comfortable with classes, interfaces, events, delegates, lambda expressions and a bit of LINQ.
If you need to strengthen your fundamentals, you can watch Mosh's related courses:
FREQUENTLY ASKED QUESTIONS
1- Do I need a Mac to take the course?
Not at all! You can use use Visual Studio on Windows to build and deploy apps to Windows and Android. You need a Mac only to build your app for iOS. And this involves simply adding a new project to your Visual Studio solution, setting it as the start up project and building it. That’s it! You don’t need to write any extra code.
So, no, you don’t need a Mac to take this course or learn Xamarin Forms in general.
2- Do I need to know about Xamarin.Android and Xamarin.iOS libraries?
Again, no! Xamarin Forms provides a simple, unified API for you to build cross-platform mobile apps. When you build your app for Android or iOS, it will internally use Xamarin.Android or Xamarin.iOS to map the common user interface elements to their corresponding native equivalent.
You need to know about Xamarin.Android or Xamarin.iOS only if you want to build custom user-interface elements.
WHAT OTHER STUDENTS WHO HAVE TAKEN THIS COURSE SAY
"Another fantastic course by Mosh! Really well presented and easy to follow along. Highly recommended for anyone wanting to get up an running with Xamarin. I have apps up on my Android device and the whole experience has been super. Thanks Very Much!" -Aindriu Mac Giolla Eoin
"Mosh has that incredible teaching skill to start from a fundamental level and then take you on a journey to iterate and improve on to a best practice mode thereby allowing you to grasp the core concept faster. Very much recommended for anyone who has always wanted to build native Android and iOS applications leveraging your existing C# skills. Keep up the good work Mosh!" -Sachin Chitran
"I read through the entire Xamarin Forms official book as well as some other books on the topic before taking this course. I wish I had taken this course from the beginning. The concepts are explained clearly, and the exercises at the end of each section really help to solidify what you have just learnt." -Morné Zaayman
"You will not be disappointed by Mosh. At first I saw his content on youtube and I wanted to get a more in depth grip of his courses. I can assure you that the investment is truly worth it. You will neither feel like the instructor is talking to a stone who has never programmed, nor feel overwhelmed by a lot of complex programming techniques. The way he explains is just right for the average coder looking for improvements." -Oproiu Stefan
"This was my first paid video course ever and wow…what a surprise! Now six months later, I already bought two other courses from Mosh Hamedani because it’s a great way to learn so much in such a short time. I became a real fan of Mosh because he gives a boost to my work career.
I recommend all the developers to watch the video courses of Mosh, you will not regret! He’s a very enthusiastic instructor who can teach you difficult concept as if they were easy. The video content includes many great exercises which will challenge yourself. Furthermore, the cheat sheets are very useful to refresh your memory." -Yen Jacobs
30-DAY FULL MONEY-BACK GUARANTEE
This course comes with a 30-day full money-back guarantee. Take the course, watch every lecture, and do the exercises, and if you feel like this course is not for you, ask for a full refund within 30 days. All your money back, no questions asked.
ABOUT YOUR INSTRUCTOR
Mosh (Moshfegh) Hamedani is a software engineer with 17 years of professional experience. He is the author of several best selling Udemy courses with more than 120,000 students in 192 countries. He has a Master of Science in Network Systems and Bachelor of Science in Software Engineering. His students describe him as passionate, pragmatic and motivational in his teaching.
So, do you want to use your existing C# skills to build native apps for Android, iOS and Windows?
Join the other 13,000 students who have taken this course and start building your first native cross-platform app within a few minutes.