Contents tagged with Xamarin.Forms

  • A Custom Map Control Renderer with Xamarin.Forms

    Xamarin.Forms.Maps provides a cross-platform abstraction for displaying maps that use the native map APIs on each platform, in order to provide a fast and familiar map experience for users. This article demonstrates how to create a custom renderer for the Map control, enabling developers to override the default native rendering with their own platform-specific customization.

  • Custom Control Renderers with Xamarin.Forms

    Using custom control renderers to change the appearance and behavior of controls. Xamarin.Forms user interfaces are rendered using the native controls of the target platform, allowing Xamarin.Forms applications to retain the appropriate look and feel for each platform. Custom Renderers let developers override this process to customize the appearance and behavior of Xamarin.Forms controls on each platform. Custom renderers provide a powerful approach for customizing the appearance and behavior of Xamarin.Forms controls. They can be used for small styling changes or sophisticated platform-specific layout and behavior customization. This article provides an introduction to custom renderers, and outlines the process for creating a custom renderer.

  • Themes with Xamarin.Forms

    A theme is added to a Xamarin.Forms application by including the Xamarin.Forms.Theme.Base Nuget package, plus an additional package that defines a specific theme (eg. Xamarin.Forms.Theme.Light) or else a local theme can be defined for the application.

  • MVVM (Model-View-ViewModel) Pattern with Xamarin.Forms

    The MVVM (Model-View-ViewModel) pattern lends itself naturally to XAML application platforms such as Xamarin.Forms. This is because the MVVM pattern leverages some of the specific capabilities of Xamarin.Forms, such as data binding, commands, and behaviors. MVVM is similar to many other patterns that separate the responsibility for the appearance and layout of the UI from the responsibility for the presentation logic; for example, if you're familiar with the Model-View-Controller (MVC) pattern, you'll find that MVVM has many similar concepts.

  • Asynchronous Programming (async and await) with Xamarin.Forms

    You can avoid performance bottlenecks and enhance the overall responsiveness of your application by using asynchronous programming. However, traditional techniques for writing asynchronous applications can be complicated, making them difficult to write, debug, and maintain. A simplified approach, async programming, that leverages asynchronous support in the .NET platforms. The compiler does the difficult work that the developer used to do, and your application retains a logical structure that resembles synchronous code. As a result, you get all the advantages of asynchronous programming with a fraction of the effort.

  • Create a Plugin for Xamarin.Forms

    Xamarin.Forms enables you to share not only your app’s business logic, but also a shared user interface across iOS, Android, and Windows. Using Xamarin.Form’s built-in dependency service, it enables you to get access to the native platform to expose rich functionality unique to the underlying platform. Using the portable class library (PCL), and NuGet, sharing this code is straightforward. In this article I will create a plugin for logging (logger) in Xamarin Forms.

  • Unhandled Exception Handling in iOS, Android and Windows with Xamarin.Forms

    Unhandled exceptions are hard to catch and log, and you must do it to be able to handle the errors in your app. One approach is to use Xamarin.Insights but you always want to be able to just log into a file and then access that file locally.The code below is what we use right now and it has helped us a lot, especially the unobserved task exceptions that are just silent, i.e. they do not crash the app, but you still want to handle the exceptions.