Page 22 - MSDN Magazine, August 2017
P. 22

XAMARIN.FORMS
How Xamarin.Forms
Customization Took an
FAA Drone App Higher
Dan Hermes
More than 1 million drones are in the hands of recre- ational flyers. People are taking unprecedented video footage of events, geography and nature with drone cameras. Commercial drone flyers are conducting inspections of structures and surveying land in a way that’s changing their industries. All these drones in the air have become the concern of the Federal Aviation Adminis- tration (FAA), which has responded with a strategy and a series of new regulations aimed at helping flyers operate safely and legally.
Of course, there’s an app for that. It’s called B4UFLY, and it’s written in Xamarin.Forms (note: B4UFLY is used with permission from Network Designs and the FAA). Drawing upon FAA airport and special location data, the app provides flyers with an interac- tive map and real-time status updates depending on their position or their planned flight. The status reflects the level of flight safety and legality and helps the flyer find areas away from airports and restricted airspace. The app, as shown in Figure 1, has been down- loaded more than 300,000 times and is in its second year of updates.
The beauty of this Xamarin.Forms implementation is just how much of it is truly cross-platform. Of the 25 screens in the app, only one requires platform-specific customization. Many, if not most, mobile app requirements today include a cross-platform mandate. If such an app plan is mostly data entry and display, standard navigation and UI, and minimal graphics and animation, then it should be considered a strong candidate for development using Xamarin.Forms.
What Is Xamarin.Forms?
Xamarin.Forms is a library of cross-platform UI classes built atop Xamarin.Android and Xamarin.iOS that also binds directly to the native Universal Windows Platform (UWP), as shown in Figure 2. This provides a cross-platform set of UI components that render in each of the three native OSes.
Xamarin.Forms provides a cross-platform library of pages, layouts, and controls and is a great place to begin building an app quickly. There are two ways to create UIs in Xamarin.Forms: either in C# using the rich Xamarin.Forms API or using Exten- sible Markup Language (XAML), a declarative markup language created by Microsoft.
What Does the Xamarin.Forms Solution Look Like?
The B4UFLY solution contains four projects. The B4UFly project contains the Xamarin.Forms markup and code. The b4ufly.Droid project contains the Android-specific code and the b4ufly.iOS
This article discusses:
• Xamarin.Forms customization
• Cross-platform mobile development
• Dynamic layouts
Technologies discussed:
Xamarin.Forms, Custom Renderer, Effects, Native View Declaration
18 msdn magazine















































































   20   21   22   23   24