Top

xamarin.forms Tag

Use Microsoft Authentication Library(MSAL) in Xamarin.Forms

INTRODUCTION   Most users prefer to login with Facebook, Microsoft, Google or Twitter than using registration forms. That's why it's important to know the options and what each one of the authentication libraries offer us. Let's talk about Microsoft Authentication Library (MSAL), Perhaps, at user level is not very well known but at the business one is the most important. Many companies around the world have their employees registered in Active Directory (AD) and MSAL offers us the chance to employees with your business emails can access the applications.   Note: More than 65% of users prefer to use login with providers than to use our registration form.   PLATFORMS   MSAL is available for Android , iOS , Java , Python, Angular , NodeJS , PHP , JS and every .NET...

INTRODUCTION   Most use...

Read More
SmartHotel360 UI Test Run

Automate the UI testing of your app with Xamarin.UITest for Xamarin.Forms – A practical implementation

Introduction   Testing your apps must be a go-to if you plan to ship quality applications. You can unit-test your code for flaws in the logic side of the solution. That kind of tests are extended, and there is plenty of frameworks you can use. In essence, unit tests are more coupled to the language, but UI Tests are platform independent. Some scenarios you can find mobile UI tests useful: Verify bug regressions Prove that a bug has been resolved Check app UI behaviour in different screen sizes / OS versions Automate app navigation for screenshots Check for validations Xamarin.UITest is an automation library that can be used as...

Introduction   Testing ...

Read More

Use SkiaSharp and Xamarin Forms to create your own bindable controls

Working with Xamarin Forms is great, as it’s easy to create user interfaces that work in any of the supported platforms. It also provides mappings for most common controls such as labels, images, buttons, etc. keeping each platform look and feel. We can create complex controls in our applications combining these elements, that also could be reusable along our application or even be reused in many projects.   In this article, we are going to present a way to create controls using SkiaSharp, as sometimes our projects require some non-standard controls as plots, elements with gradients, etc. As you may know, SkiaSharp is a 2D drawing library over Skia graphics, works on .NET and we can use it from C# 😊. To...

Working with Xamarin Forms is ...

Read More

Interact with Javascript from C# using Xamarin.Forms

In one of our projects, we needed to make a navigation from a page that only contains a WebView rendering a web page, but only the web page knew when that behavior must happened, there is no way to know from the app point of view when it should happen, so we needed to call a C# method from the Javascript code of a web page.   How did we did it?   Hopefully we found this: https://docs.microsoft.com/es-es/xamarin/xamarin-forms/app-fundamentals/custom-renderer/hybridwebview   The idea is: A Xamarin.Forms View that contains the Url of the web page to load, and the method we want to call from Javascript. A renderer for each platform that will make the magic on every platform. public class HybridWebView :...

In one of our projects, we nee...

Read More

Tailwind Traders: Retrospective

As we've been doing the last years, have developed the Xamarin scenario Microsoft used during their Connect(); 2019 event. This year the fake company is named Tailwind Traders, and it's supposed to offer a variety of products ranging from working tools to house furniture. Goals & premises The apps would be made using Xamarin.Forms 4, a preview version bundling Shell, targeting Android & iOS. We, as a team, came up with a small list of goals & premises: No MVVM framework, just vanilla Xamarin.Forms: we wanted everyone looking through the code understand how Xamarin.Forms works, without any MVVM framework which would hide how it's underlying done "Clean" C# and XAML codebase: anyone having a look to...

As we've been doing the last y...

Read More

FormsPresenters: Setting Up MvvmCross with Xamarin.Forms

During the last months, we have made some improvements to the FormsPresenters plug-in taken from real-world projects we are working on with our customers, at Plain Concepts. Since we did not have some NuGet packages to make an easy install of the scaffolding needed, we dedicated some effort to add a small documentation to the GitHub repository it-self, so everyone can easily set-up MvvmCross on their Xamarin.Forms projects. The first step is to clone the entire repo. locally, and build the MvvmCross submodule. Apart from here, the rest of the steps are done within the FormsPresenters directory. You will find four different projects inside: Core one, which handles the common logic among every supported platform (Android, iOS and Windows Phone); and...

During the last months, we hav...

Read More

Branding a Xamarin.Forms app on Android: Accent Color

Here we are going to start a series of articles with some tips to brand our Xamarin.Forms app.
In this case, we are going to talk about how to apply our accent color in some parts of our Android one.

Using Android Styles
The easiest way to apply our brand color is creating a custom Android theme.

For example: if we have a simple Entry, the result Android control is showing the default colors. A focused Entry control looks like:

image1

Translating Designs into Layouts: Units Conversion

One aspect that Apple pushed to the limits is the union between Designers and Developers. Instead of understanding the product development process as a chain, it is done as a very close relationship walking in the same direction. Both of them speak different languages: they use different tools during their day-to-day job, they see different aspects of the product, their definition of done is different, etc. But there is something in common, which turns out to be a quite important thing: both want the product to succeed. Both want to deliver the best shape of what they are working on, and want to exceed the customer's expectations. Thus, it is worth looking for ways to improve this beautiful marriage. Within the following...

One aspect that Apple pushed...

Read More