Wintellect Blogs

Unit Testing Your Xamarin Forms Applications with F# and FsUnit

Jonathan Wood

14 Aug , 2015  


One of the best and easiest ways to use F# in your projects is to use it for unit testing and the same can be said for your mobile applications with Xamarin.

While C# has FluentAssertions as well as Should (I prefer the syntax of FluentAssertions between the two) F# has FsUnit to give more readable test conditions. I would say even more readable than the C# equivalent.

With this post I’ll have a small demo Xamarin project using Xamarin Forms to build the UI. This will consist of a simple navigation and a small class to do some logic. We will use F# for our test project to test both the logic and use Xamarin UI Test to make sure our navigation and screens appear as we intend. These tests are also to make sure our workflows work as intended on several different devices.

Let’s quickly compare the two and see how they look. Within our demo Xamarin application, our PCL project that includes our XAML for Xamarin Forms will also have a class to do some logic for us. For demo purposes, this will just be an Add class that takes in two integers and adds them together and returns the result.… Read more

, , ,

Wintellect Blogs

Understanding Native Image Sizing in Xamarin Forms Apps

Keith Rome

12 Aug , 2015  


This post is about probably my least favorite part of mobile app development – figuring out and assembling all of the various images needed to build an application and publish it into the stores. Each platform has its own requirements for this, and often you will need to provide multiple resolution versions within each platform in order to handle varying pixel density ratios. Xamarin supports all of the necessary resource types of course, but it is still up to us as developers to include the right images in our projects.

For very simply apps this isn’t quite as big of a problem – but it becomes a huge headache for medium-size and large-size apps. To help make my life easier, I like to use a spreadsheet to identify all of the images needed along with the final image resolutions and preferred file names. This works great because I can give this spreadsheet to the UX designer and have them provide all of the assets – already sized and named appropriately so that I can just drop them right into my project. So let’s cover all of the various image types that an app might need – including both the minimum required images as well as optional ones.… Read more


Wintellect Blogs

Fixing MacBook Pro Windows 10 In Place Upgrade Issues

John Robbins

2 Aug , 2015  


On my production machine, my Apple MacBook Pro, I did an in place upgrade from Windows 8.1 to Windows 10. I ran into a couple of bumps and got them figured out so I thought I’d post this for others seeing the same problems. That way when combined with the power of Greyskull (AKA internet search engines) they can get answers if they hit the same issues.

The first issue I ran into had nothing to do with the MacBook Pro. I’d been short on disk space so pushed my 7 GB C:\Windows\Installer\$PatchCache$ directory to another drive with a directory link. That worked fine in Windows 8.1, but about 40% through the pre boot processing in Windows 10 setup I’d get the awesome “Something Happened” error. I’d made a strong mental note that I’d moved the $PatchCatch$ directory so that was the first thing I fixed. I had to make some room on the drive so did things like deleting my Outlook .OST file, which would get recreated the next time I started Outlook.

With 9 GB free on my C: drive, and $PatchCache$ in the proper location, I tried again. The upgrade was smooth sailing at that point. Once I logged into Windows 10, and deleted Windows.Old through the Disk Cleanup Utility, I was thrilled to see my 8 GB fee space had jumped to 19.2 GB.… Read more


Wintellect Blogs

Taming the SplitView Control in Windows 10

Jeff Prosise

30 Jul , 2015  

Tsavo, a huge male lion, licks Thomas Chipperfield's face

Of all the new controls featured in Windows 10, SplitView is perhaps the most emblematic. SplitView makes it easy to implement “hamburger menu” interfaces like the ones featured in Windows 10’s built-in News, Sports, and Photos apps, among others. A hamburger icon consisting of three horizontal bars sits atop a ribbon on the left side of the window. The ribbon contains iconic buttons, most of which navigate to another page in the app when clicked. Typically, but not always, clicking the hamburger icon expands the ribbon to reveal labels to the right of the icons. It’s an easy navigation pattern to learn, and even if somewhat controversial, it’s already familiar to users who have seen similar UI paradigms used in Web sites and mobile apps.

Most developers who set out to use SplitView for the first time are surprised at how lean it is. SplitView has little in the way of a default UI other than a pane that expands and collapses. There is no SplitViewItem class for placing buttons in a SplitView, and precious little guidance on how to implement them. Plus, incorporating a SplitView in your app requires some restructuring of the code that Visual Studio dumps into App.xaml.cs.… Read more

, , , , ,

Wintellect Blogs

Where Oh Where Did My Response.SignOut Go in ASP.NET v.Next beta 6?

Rik Robinson

28 Jul , 2015  


If you’ve just fought through an update from ASP.NET v.Next beta whatever to beta 6 and now you’re staring down the last few red squiggled lines only to come across this little gem about SignOut no longer existing, I can help you get back to signing out in just a few steps.





In this beta, it appears that the sign out functionality has been moved into AuthenticationManager.  Luckily, you have one of these already attached to your Context in the form of Context.Authentication.  So, the first thing you’ll need to do is replace your calls to Context.Response.SignOut() to instead call Context.Authentication.SignOutAsync().  You’ll want to also make the appropriate updates for async and such.  My original example above then becomes this instead:


Sign Out – but not really
  1. [HttpGet]
  2. public async Task<IActionResult> LogOff()
  3. {
  4.     if (Context.User.Identity.IsAuthenticated)
  5.     {
  6.         var authority = String.Format(_config.Get(“AzureAd:AadInstance”), _config.Get(“AzureAd:Tenant”));
  7.         var authContext = new AuthenticationContext(authority, new TokenCache());
  8.         authContext.TokenCache.Clear();
  9.         await Context.Authentication.SignOutAsync(OpenIdConnectAuthenticationDefaults.AuthenticationScheme);
  10.         await Context.Authentication.SignOutAsync(CookieAuthenticationDefaults.AuthenticationType);
  11.     }
  12.     return RedirectToAction(“Index”, “Home”);
  13. }


This gets you past the compiler and, if you run the above, you’ll find that it doesn’t give you any errors at runtime. … Read more


Wintellect Blogs

Exciting New Things in F# 4.0

Jonathan Wood

27 Jul , 2015  


With the latest news of the release of Visual Studio 2015 some folks may not have realized but included in it is the newest release of F# 4.0. The .NET Blog has also officially announced the RTM. The most exciting thing about this release of F# is that, since F# has been open source for quite some time now, most of the fixes and updates were made by the F# community.

What exactly is different in the new version of F# is very nicely highlighted in the below video by Lincoln Atkinson.

F# 4.0 Quick Picks

However, there are quite a few other new features. Let’s take a quick look at a few of the ones I’m excited about.

Script Debugging

I’m sure I’m like most of the folks who mess with F# that they do a lot of their work with F# scripts and the F# Interactive, however before F# 4.0 there was no way to debug your scripts. Now we get the best of continuing to use scripts and being able to debug them!

F# Debugging

Normalized Modules

As Lincoln mentioned in the above video, all functions are now normalized across List, Seq, and Array collections. This means that you can access the same functions among each of these collections where as in F# 3.1 that wasn’t always the case.… Read more

Wintellect Blogs

Azure Bits #4 – Adding the Azure Web Job

Rik Robinson

24 Jul , 2015  


This post’s main objective was originally about completing the initial skeleton of uploading an image from a web page and generating a thumbnail from an Azure Web Job using Azure Blob Storage and Azure Queues, but it turned into a pretty large refactoring in anticipation of having something a bit more realistic to eventually post to GitHub.  So, I’ll devote the first part of the post to a brief review of the most significant changes and then introduce the Azure Web Job into the mix and finally, I’ll retrieve the message from the Azure Queue and show its name in the console.  I’ll then devote Azure Bit #5 to processing the original image and generating a thumbnail to complete the initial skeleton of our Image Manipulator application.

Changing the Serialization Strategy

I’m not sure why I originally chose to go with serializing my UploadedImage to a ByteArray before inserting it into the Azure Queue, but I’ve now simplified things a bit and switched over to serializing my UploadedImage as JSON.  This allows me to drop the ByteArray extension methods that I previously added to the project and it buys me some nice auto-hydration of my UploadedImage later when my processing function is called in the Azure Web Job. … Read more

, ,

Wintellect Blogs

My First CodeStock Experience

Jonathan Wood

21 Jul , 2015  

I’ve gone to few conferences lately since starting my software development career. I plan on going to several more as I find them throughout the year. Just recently, I decided to checkout CodeStock. Why go all the way to Knoxville, TN for a conference I’ve never been to before? Wintellect helped sponsor the conference and a few of the folks here had some sessions that were quite interesting. I wanted to help support my colleagues with their sessions and also to go to some of the other sessions to learn new things. There are two main reasons that I go to conferences. That is learning from each of the sessions as well as meeting and talking with other developers. CodeStock definitely had a lot of great sessions and came away with several new ideas and perspectives.


CodeStock had a wide array of sessions, from functional programming to AngularJS to honing your soft skills. I tried to spread out in different areas as much as I could. I’m sure everyone who’s gone to a conference has experienced that there were too many sessions to go to at the same time. I do hope this is motivation for speakers to attempt to screencast their talks.… Read more


Wintellect Blogs

Build an Angular 2 App – Data Binding Syntax

Josh Carroll

20 Jul , 2015  


In our previous article about building a simple application in Angular 2, we laid the foundation for moving forward and covered all the very basics about bootstrapping your application. However, it’s more or less a hello world application, and that, has been done already a number of ways.

The goal is to build a small real-ish application that you can use to gain ideas and inspiration from as you dive into Angular 2 yourself. However, we need to get some basics on the new data binding syntax out of the way.

Data Binding

Now, I cannot possibly do a better job explaining this than Victor Savkin already has in his article: Angular 2 Template Syntax, so I am not going to try. I highly encourage you to go take a look at that article to get an in-depth explanation of the new data binding and template syntax within Angular 2.

Instead, what I want to focus on is the 90% case, and the implications that has in terms of how you build your applications.

The Basics

Again, Victor’s article goes into a great amount of detail on this, but here is a condensed version of the basic data bindings you will be using everyday in your applications.… Read more

, , ,

Wintellect Blogs

Cloud Saturday Atlanta – a Call for Speakers

Keith Rome

17 Jul , 2015  

Cloud Saturday is a new event for the Atlanta area, and we are currently looking for speaker submissions. The event is being planned for 9/26, and will be held in Alpharetta at Microsoft’s regional training facility. While Microsoft is a sponsor, this event is open to ALL cloud platforms. Amazon, Google, Microsoft and any other vendor platforms are equally welcome (and encouraged!) to have representation. As this is the inaugural event (we hope to hold this in future years as well), there are only a limited number of speaking slots available… so please sign up soon if you are interested in being a part of this event! We are accepting multiple submissions per speaker – however not all submissions may be selected, depending upon our ability to accommodate the additional sessions and/or the interests of keeping the event well-balanced.

Sessions can be technical in nature, or management oriented. We expect that our audience will include a healthy mix of developers as well as IT managers and architects.

Please visit learn more or to sign-up as a speaker.


cloud saturday logoRead more

, ,