Tag

Xamarin Forms Archives - Falafel Software Blog

Xamarin: Creating a sliding tray

By | Xamarin | 6 Comments

Call it a sliding window, a drawer, a hamburger; it is the latest craze in navigation. You click on the ubiquitous icon of three lines and the page slides over to reveal… Well whatever you want. Often it reveals navigation choices.

So the question arises: how do you do this in Xamarin.Forms? I have looked at a number of sources and samples and have synthesized them into an approach I like.

Read More

XAML Inheritance in Xamarin

By | Xamarin | 9 Comments

Now it’s time to build the Fiction page. Hmmm, it is just like the Book page but with a different title (and of course, a subset of the books). We could copy and paste the XAML into the Fiction page. But then the NonFiction page is very similar to the Fiction page ,as is the Biographies pages. In each case, as far as the view is concerned, all we want to do is change the title. We could implement this by copy and paste, but “clipboard-inheritance” makes me itch.

Read More

Falafel Software to Cover Industry’s Hottest Topics at CodeMash 2015

By | C#, careers, Mobile, Xamarin | One Comment

Falafel Software will be taking CodeMash 2015 by storm with multiple sessions from our own industry experts including Lino Tadros, CEO; Steve Smith, CTO; Jesse Liberty, Master Consultant; and Carey Payette, Senior Software Engineer. We’re honored to have such wonderful representation at such a world class industry event. What? Falafel at CodeMash 2015 When are our sessions? Demonstrations of training and consulting in Falafel booth #N13 – During exhibit hall hours Steve Smith co-presenting Software Craftsmanship PreCompiler Workshop – Wednesday all day in Aloeswood/Leopardwood Jesse Liberty PreComiler Presentation “Cross Platform Mobile Programming with Xamarin.Forms” – Wednesday at 1:00pm in Salon…

Read More
Trigger at work

Triggers in Xamarin.Forms 1.3

By | News, Xamarin | 8 Comments

Yesterday, I wrote about one of the new features in Xamarin.Forms 1.3 (Technology Preview 2), Styles. Today I’ll take a first look at Triggers. The key idea of Triggers is “When this happens, do that.”… Let’s suppose we’re building a form and we’d like to enhance the Entry control so that when the user is entering data the text color is blue, but when s/he is done the text color turns black. We can do that in markup…

Read More

Xamarin.Forms: Styles

By | News, Xamarin | 10 Comments

Xamarin.Forms 1.3 is now available in Community Preview 2 (the final community preview before release). While this is not a release version, it is close and worth taking a look at. It has a number of killer features. In this post, I will look at Styles.

Read More

Xamarin.Forms: Static vs. StaticResources

By | News, Xamarin | 6 Comments

This is post 28 of 50 in the series “Learning Xamarin” Often, there will be multiple views in your form that share the same values (e.g., font size, color, etc.).  There are a couple ways you can handle this: Create a resource dictionary and then refer to the resources using the key and the keyword StaticResource Declare constants and then refer to them using x:Static While the names are very similar, x:Static and Static resources work differently.  The former access a public static constant  (or a public static property defined by a class).  The latter, static resources, is a markup extension…

Read More
Falafel-2-go-iOS-ListView-White-Background

Adding Transparency to the ListView on iOS with Xamarin Forms Custom Renderer

By | Xamarin | 3 Comments

One of the minor issues we encountered when developing Falafel 2 Go was that on iOS, the ListView defaults the background color of the ViewCell to white. I’m not sure if this is an oversight, intentionally by design, or if it will be changed in the future, but we needed a way to make it transparent. Otherwise the textured custom background from the design would be covered up by the white background of the ListView on iOS. Here’s what it looks like before: Custom Renderers Fortunately, this was a simple issue to resolve by creating yet another custom renderer to…

Read More

Adding Tapped Event Gestures to Any XAML Control with Xamarin Forms

By | Xamarin | 3 Comments

We previously looked at how to create User Controls with Xamarin Forms to display an Image Button for the different activities in our Falafel 2 Go application. Now that we have these reusable buttons, we need to make them tab-enabled so that they can launch the appropriate activity. As we’ll see in today’s post, this is very simple to implement with Xamarin Forms. Native Tap Events By default, only a small selection of Xamarin Forms controls expose events such as “Tapped” or “Selected” natively. ListView and the related ViewCell are examples, which makes sense as that is generally the purpose…

Read More

Getting started with Xamarin Android Player

By | Xamarin | One Comment

If you have been following Xamarin’s Evolve keynote, you would by now be, like me, SUPER EXCITED about all the innovation that Xamarin is doing in the mobile space. One of the Xamarin Platform enhancement that was announced today was Xamarin Android Player. If you dealt with Android Emulator before you will be really familiar that its really slow. We here at Falafel Software always used Geny Motion in favor of Google’s Android Emulator. This post will walk you through how to get Xamarin Android Player up and running. First, please head to Xamarin’s Android Player site and download the version…

Read More
Xamarin-Forms-Image-Cell

Creating Reusable XAML User Controls with Xamarin Forms

By | Xamarin | 10 Comments

In the previous post on making fancy layouts with Xamarin Forms we saw how you can design a Dashboard style application that stretches to fill any device size. However one of the challenges of the particular design we chose for Falafel 2 Go was the need to support the concept of an Image Button, where both the icon and the text work as a single control to launch an activity. Xamarin Forms does provide an ImageCell control, which can be used in a TableView to render both text and image as a single control. However, this control is laid out…

Read More
falafel2go-xamarin-forms

Beyond the ListView: Fancy Layouts with Xamarin Forms

By | Xamarin | 5 Comments

We’ve already seen how Xamarin Forms makes it easy to create cross-platform applications that share common layout and behavior. While the included controls like ListView encapsulate a lot of useful behavior, they don’t make for the fanciest layouts. In early versions of Falafel 2 Go we had a simple ListView control as the main page, displaying all of the Activities we want to showcase, such as Blogs and Training as well as links to our social profiles. This worked great for testing but didn’t make for a very compelling application interface: In an attempt to at least add some visual…

Read More
MVVM Projects

Falafel2Go and MVVM

By | News, Xamarin | 12 Comments

When we decided to rewrite Falafel2Go, we quickly decided to do so with Xamarin Forms. One of the many advantages of Xamarin Forms is how quickly you can write the software. Among the other advantages are that it supports XAML and databinding. We thus made the somewhat obvious choice to use the MVVM pattern

Read More
Xamarin Forms ListView

Creating a basic list in Xamarin Forms

By | .NET, Android, C#, iOS, Mobile, Xamarin | 2 Comments

Lists are all over the mobile app scene – and for good reason too. They’re a great way to display groups of almost any type of data. Creating a list inside your Xamarin Forms project is an easy cross-platform solution to data organization. We’ll start off with a fresh Xamarin Forms PCL project. Inside your PCL you will find App.cs. By default this contains a Page object called “MainPage” which returns a basic label. This is where we will work with our simple list.

The code sample above is the construction of a simple ListView. There are a few…

Read More