Deploying Xamarin and Maui apps from Azure Pipelines to Google Play

Being able to deploy directly to an app store from a CI/CD pipeline is incredibly convenient, improves repeatability, and generally a good practice. But there are several pieces that have to be put in place to get it running. We’ve had to do it multiple times, so we ended up writing this up as aContinue reading “Deploying Xamarin and Maui apps from Azure Pipelines to Google Play”

Setting up your Xamarin.Forms application as a sharing target

Using Xamarin.Forms to develop mobile applications is particularly desirable because most of the UI and interaction logic for iOS and Android can be shared in a single common project. However, there are instances where code cannot be shared and has to be implemented in the platform specific projects. One scenario that we will be discussingContinue reading “Setting up your Xamarin.Forms application as a sharing target”

Inefficient Xamarin.Forms Layouts

Unnecessary attributes and layouts on a Xamarin.Forms page can slow down the performance of your app – https://docs.microsoft.com/en-us/xamarin/xamarin-forms/deploy-test/performance. This guidance has been around for a long time, but we wanted to know what kind of impact it really can have. Putting it to the test We created two similar ListView layouts. The first layout intentionallyContinue reading “Inefficient Xamarin.Forms Layouts”

Getting whitespace right with Roslyn CSharpSyntaxRewriter

Most agree that Roslyn is a great C# code analysis and refactoring tool. One particularly powerful tool Roslyn has is it’s CSharpSyntaxRewriter [1]. The rewriter allows you to walk down the namespaces and classes of a project and add and edit code where necessary. While the documentation here [2] and the RoslynQuoter [3] can comeContinue reading “Getting whitespace right with Roslyn CSharpSyntaxRewriter”

XamRight for Xamarin Native Code

Even when developing a cross-platform Xamarin.Forms app, you still often need to write some platform-specific code to get the most out of each platform.  Apart from analyzing Xamarin.Forms Xaml code, the latest version of  XamRight also introduces error checking for Xamarin.Android and Xamarin.iOS C# code. Here we will look at some of the common errorsContinue reading “XamRight for Xamarin Native Code”

Deep Dive into LayoutOptions in Xamarin.Forms Part 2 (Grids)

In a previous post, I started methodically working through how LayoutOptions work inside different containers.  In this post, that topic is continued, detailing the interactions between LayoutOptions and Grid. While LayoutOptions values on child views of Grids do aid in positioning the views, LayoutOptions values do not have the same amount of control over theContinue reading “Deep Dive into LayoutOptions in Xamarin.Forms Part 2 (Grids)”

LayoutOptions in Xamarin.Forms

From my experience working with Xamarin.Forms layouts, I found using LayoutOptions to be rather confusing. I would throw them around if and when I thought they were appropriate. And more often than not, they produced inaccurate results. While the documentation provided on the Xamarin.Forms website was somewhat helpful, I still made mistakes and used aContinue reading “LayoutOptions in Xamarin.Forms”