In my previous post, I talked about using the Camera with Forms- Kenmore dishwasher based applications. In this post I explain how to save and then use the photos you take.  


This article is part of a series. You can find the complete series index here


Saving The Photo

Once we take the photo, the first task is to save it.  I chose to save the photo as a file on disk, with the name of the file created as #.jpg where # is the ID of the associated item.  

To do this, I want my Xamarin Forms page to ...

We previously looked how to create a Xamarin Forms App using Azure Mobile Services for storing and retrieving data. However, up until now, we have been saving the data globally so that it is accessible to all users. This post will explore how to add device-specific authentication to each app so that users can register and manage their own private data using any of the supported authentication providers.

Azure Identity Providers

Azure Mobile Services includes built-in support for authenticating against several different providers, including Facebook, Twitter, Microsoft, Google and even its own Azure Active Directory. Setting ...

In this post I return to the EvalUate application I was building camera photoearlier in this series.  

We're going to add the ability to take a photo of the item you are thinking about buying.  It turns out there are a number of different ways to access the camera, but I was looking for one that would work and play well with Xamarin Forms.  

I'm pleased to say that the Xamarin Forms Labs, (XFL) an open source project, has a Camera service (though it is in Beta).  

XFL looks very exciting and much has been written ...
Xamarin Forms are the most exciting library to come along in a long time; certainly for Missing puzzle piece mobile programmers.  They bring a whole new option to cross platform development: an abstraction layer that lets you write once, and run native on each of the platforms.  

Write Once, Render Natively

This means, for example, when you create a tab page, it is rendered as a native tab page on iOS, Android and Windows Phone.  This is accomplished using pre-defined elements each of which has a hidden renderer for each platform.  Most of the time you don't know or care how it ...

Sitefinity 7 comes with a very cool new feature that enables us to add custom fields to Pages module through UI. Although this feature was previously not available in version 6.3, but its effect could be achieved by using Page Attributes. Also, in version 7, its called Custom Fields. Following is the helper class.

ModuleHelper.cs

public  class ModuleHelper
    {
         public  static  void RegisterGuidArrayFieldSelectorForPages<C>(string fieldName)
            where C : FieldControlDefinitionElement
        {
            RegisterPageNodeDynamicData();

             string itemType =  typeof(PageNode).FullName;

             var fieldExists = GetMetaFieldsForType(itemType)
                .Where(f => f.FieldName == fieldName).SingleOrDefault() !=  null;

             if (!fieldExists)
            {
                 var metaManager = MetadataManager.GetManager();
                 var field = metaManager.CreateMetafield(fieldName);
                field.FieldName ...

This post continues the series on building a cross-platform app with Xamarin Forms. Although the focus is to demonstrate using Azure Mobile Services, there is a lot that we can do first to improve the user experience of the app. Today we will look at how easy it is to add a loading indicator as well as automatically refresh the app views when changes are made.

ActivityIndicator

Xamarin Forms includes a handy ActivityIndicator control which can be used to indicate that a long-running process is occurring. This is perfect for the Rebate Reminder app, since it has to fetch the ...

In our last post (Creating Device-Specific Properties in Cross-Platform Apps with Xamarin Forms) we looked at how we can leverage Page Resources to create device-specific properties that can be reused across the page. Today we'll look at how we can convert these and other reusable property definitions to global resources so that all of an apps resources can be maintained from a single location.

No App.xaml? Static Classes to the Rescue!

XAML apps such as for Windows an Windows Phone exposes a global App.xaml file which compiles along with the application. This allows you to define resources declaratively ...

In one of my previous posts, I showed you how to keep your Visual Studio Web Essentials settings in sync with the rest of your team.  Today I'll demonstrate one of the hidden gems in this great Visual Studio extension: creating image sprites.

Why Image Sprites?

The first question to answer is why we would want to use image sprites.  In the early days of the web when users had internet connections measured in Kbps instead of Mbps, it was essential to optimize images to reduce their size (which often led to limited color palettes and artifact-heavy jpegs).  While ...

Managing dependencies is baked into many languages and is a cornerstone to creating modular architectures. For C#, there the using namespace directive; for PHP, there is the include function; for CSS, there is the @import statement; and finally for JavaScript ES6 modules, we will have import {Module} from './somewhere' or one could use AMD today. Now, HTML joins the ranks and will also offer dependency management!

Introducing HTML Imports

HTML Imports are a way to include and reuse HTML documents in other HTML documents. Behold:

<link rel="import" href="goodies.html">

This loads the full HTML resources ...

The previous post Cross-Platform Apps with Xamarin Forms and Azure Mobile Services demonstrated a simple Xamarin forms app to store and manage rebates. However, there were a few issues that impeded the user experience that should be polished up.

Specifically, there are some discrepancies between the different platforms, such as different font sizes as well as a missing Page title on the Windows Phone version.

Today we'll look at how we can create and use page resources to create device-specific properties allowing us to update the Rebate Reminder app to create a more unified user experience.

Device-Specific Properties

Specifying a ...

CAPITOLA, CA – July 15, 2014 – Falafel Software, the leading provider of software development, consultation and training services has released a new software development kit for Sitefinity. The software development kit (SDK), Babaganoush, instantly adds functionality to Sitefinity websites.

The Babaganoush SDK allows developers to start coding on Sitefinity instantly to create server, client or mobile apps — allowing them to focus on solutions instead of troubleshooting issues or inconsistencies. With the SDK they are able to dramatically cut development time and costs by following proven patterns that provide short cuts.

The code in Babaganoush has been created in ...

In just few days, 50 Falafel and family members  will assemble in Florida ready to sail the fun seas.  The Dream Team will be sailing to the Bahamas on the Dream Disney Cruise.DreamDisney

For the last 11 years, I made a commitment to always share the success and joy of Falafel Software with all the people that made Falafel Software so successful.  That is not only the members of the team but also their families as they are a significant part of the journey.

On Sunday, the Dream Cruise ship will be taking all of us to Nassau then to ...

Inspired by Jesse Liberty's fantastic blog series on learning Xamarin Forms, I decided to explore developing a fully cross-platform app of my own using Xamarin Forms. I thought it would be useful to explore how I can leverage Azure Mobile Services within the app to create a unified experience for a user regardless of which device they use, and allow their data to travel with them.

For this app, I've chose to resurrect the very first app I ever developed, Rebate Reminder. I wrote this app YEARS ago when  was first starting out as a developer, and was an ...

NB: The opinions expressed here are mine alone, and do not necessarily reflect those of Falafel Software, its employees or management, or anyone else.

The Prime Directive  

The very first thing I'd do if I were Miguel De Icaza (who I admire and who certainly does not need my advice) would be to make clear to evbulls eyeery employee in the company that our number one priority, the prime directive of Xamarin,  is now to lower the bar to entry for programmers who want to create cross-platform mobile applications.   

The logical consequence of this is that ...

If you are working with Xamarin, perhaps in a shared environment, you may come across a new Forms Xaml Page that is in the file system but not yet included in your project. When you proceed to "Include in Project", you may then encounter this error in the constructor of the ContentPage:

InitializeComponent does not exist in the current context

It turns out that when you add a Forms Xaml Page in Visual Studio it makes some additional changes to your .csproj file to compile the xaml control along with the partial class. It looks something like this:

    <ItemGroup...
In yesterday's post we looked at using HTTP with Web Forms and creating Web viewera list of blog posts from an RSS feed. Today we'll add the ability to tap on one entry in the list and see that blog post in a viewer on the phone.

[Click on image to see full size]

The image shown here, incidentally, is an exact reflection of what is running on my iPhone thanks to a very handy utility named Reflector.  You run reflector and then use AirPlay on the phone to mirror what is on your phone onto the screen.


This is ...
Let's say we're building an application, and we want to list the titles and publication NuGet HTTP Librarydates from an RSS feed.  

We can do this using a ListView, but we have to get the feed, and to do that we need a library; specifically the NuGet package Microsoft.Http.Client Libraries.  

[Click on the image to see it full size]

This is part of the on-going series of posts on Learning Xamarin; a complete index to the series can be found here.

To create our application we'll start with a new Forms application by firing up Xamarin Studio and selecting New ...

Microsoft recently released a community tech preview of the next version of Visual Studio, code-named “14” (because that’s what comes after 12, naturally).  Tom Dykstra has written a series of great walkthrough articles on ASP.NET vNext and Visual Studio “14” that are worth a read.  I’m going to describe my own experiences with the new tools here, along with some quick video walkthroughs that you may find useful if you prefer that to reading (if a picture is worth a thousand words, what is a 5-minute video with 15fps worth?).

In this video we take a look at what ...

 empty-test

A big part of using the MVVM pattern is separation of concerns, and to make testable code. Why is it then that ViewModels in Kendo UI apps are often left untested?

For me, I always find myself trying to test parts of my ViewModel, until I end up having a direct reference to a DataSource in it. For example:

dataSource = new kendo.data.DataSource({
    autoSync: true,
 
    transport: {
        read: {
            url: "api/people",
            type: "GET",
            dataType: "json"
        },
        create: {
            url: "api/people",
            type: "POST",
            ...

HOT Xamarin tip

If you are running Xamarin Studio on the Mac you can only get one instance at a time,  but you can work around this by opening terminal and entering    

open -n '/applications/xamarin studio.app’

In fact, as Mike Bluestein (Xamarin Evangelist) pointed out to me, you can even save that to AppleScript and add it to your dock.

Update:  You can get this launcher to add to your dock, which works beautifully!

launcher

Get weekly updates in your inbox!