Follow me on Twitter at
FYI, I'm blogging most of my stuff over at More Wally now.
You might want to add my rss feed to your reader at:
August 2013 - Posts - Wallace B. McClure

Wallace B. McClure

All About Wally McClure - The musings of Wallym on Web, HTML5, Mobile, Xamarin.iOS, Xamarin.Android, and Windows Azure.


Visual Studio Magazine Column Personal Blog


Book Authors




Georgia Tech Bloggers



August 2013 - Posts

HTML5 Threading with Web Workers and Data Storage with IndexedDB - MSDN Article

In a previous article, I looked at the HTML5 <video> tag and History object, two of the many features that developers have started to implement to give users of their apps new input controls, jQuery Mobile features, location and mapping, and much more. In this article, I continue exploring HTML5 features with a look at Web Workers, which let you speed up your client-side applications, and Indexed DB, a client-side data storage mechanism that is the preferred storage approach going forward in HTML5. (Before Indexed DB—also known as the Indexed Database API—work was focused on a standard named WebSQL. That work was discontinued in the fall of 2010. IndexedDB is the result of follow-on work to create a standard for data storage in Web browsers.)

Note: The APIs for HTML5 vary slightly across different versions of browsers and different implementations. Because HTML5 is still in the recommendation phase at the W3C, you should think of it as a draft at this point. Because these APIs may change before they become a final standard, I cover only the version of HTML5 implemented in Internet Explorer 10. Every opportunity will be made to test the code across other browsers to verify that it works.

Posted: Aug 29 2013, 12:01 PM by Wallym | with no comments
Filed under: ,
Shrinking an image in iOS with Xamarin.iOS and C#

Images taken with the camera are rather large in the iPhone.  How do you shrink them down?  I need to shrink them because I am going to send them to a web service and I want to spend as little time as possible in the upload process.  While I am not sure that this is the best code, it seems to be working for me.  I want to put this out for sharing and if you have a suggestion on how to make it better, please let me know.

                UIImage img = UIImage.FromFile (fileName);
                var width = img.Size.Width;
                var height = img.Size.Height;
                var newWidth = defaultImageWidth;
                var newHeigth = height * newWidth / width; // I always hope I get this scaling thing right. #crossedfingers
                UIGraphics.BeginImageContext (new SizeF (newWidth, newHeigth));
                img.Draw (new RectangleF (0, 0, newWidth, newHeigth));
                img = UIGraphics.GetImageFromCurrentImageContext();
                UIGraphics.EndImageContext ();

Video and History support in HTML5 with Internet Explorer 10 - Article on MSDN

Who hasn’t started looking at the mobile Web and HTML5—features like the viewport, new HTML5 controls, geolocation and many others that are part of smartphones, tablets and advanced browsers? With these features, developers have started to provide users with fairly common, new input controls; jQuery Mobile features; location and mapping; and much more. In this article, I describe two features that you might not be familiar with: the <video> tag and Web history. The <video> tag lets you display video without the need for plug-ins like Flash. Web history allows users to use the Back button to return to the previous page in an AJAX application.

Posted: Aug 28 2013, 02:16 PM by Wallym | with no comments
Filed under: ,
Tech After Dark - Mobile Web Development - August 27-29


In the busy world of development, you barely have time to learn something new because you’re so busy dealing with the technology you’ve already got. Wouldn’t it be great to take control of your learning? But when? Your days are already spoken for.

Mobile development is a hot item. Customers are buying iPhones, iPads, Android devices, and many other mobile computing devices at an ever increasing record pace. Devices based on iOS and Android are nearly 80 percent of the marketplace. RIM continues to be dominant in the business area across the world. Nokia's growth with Windows Phone will grow on a worldwide basis.

At the same time, clearly web development is a tremendous driver of applications, both on the public Internet and on private networks. How can developers target these various mobile platforms with web technologies? Developers can write web applications that take advantage of each mobile platform, but that is a lot of work.

Into this space, the jQuery Mobile framework was developed. This eLearning series will provide an overview of mobile web development with jQuery Mobile, a detailed look at what the jQuery Mobile framework provides for us, how we can customize jQuery Mobile, and how we can use jQuery Mobile inside of ASP.NET.


UIRefreshControl Timeout with Xamarin.iOS

The UIRefreshControl doesn't have a timeout mechanism built into it.  Once the refresh begins, the control will display that a refresh is occurring until the .EndRefreshing() method is called.  Because we are in a mobile environment, the data may never come back.  We don't want to display the UIRefreshControl forever.  Solving this problem is actually pretty simple.  Setup a timer and when the timer runs, call .EndRefreshing().  Here is some code I used for this:

nstRefresh = NSTimer.CreateScheduledTimer( new TimeSpan(0,0,20), delegate{
if( uir.Refreshing )
nstRefresh = null;

I hope that this helps

Posted: Aug 21 2013, 05:04 AM by Wallym | with no comments
Filed under: , ,
Using the UIRefreshControl with the UICollectionView in Xamarin.iOS

If you have used Twitter on an iPhone, you are familiar with the concept of pull to refresh.  When you work with a UITableViewController, there is a .Refresh property that can be used to assign  a Refresh Control to.  A UICollectionViewcontroller has many similarities.  Unfortunately, the .RefreshControl property is not one of them.  How in the heck are you supposed to provide the same functionality in the UICollectionViewController?  It is actually rather simple, but not documented by Apple.  I found this on Stack Overflow and translated it to Xamarin.iOS.  The steps are:

  1. Create the UIRefreshControl just like you would with the UITableViewController.  Set properties on the UIRefreshControl just like you have previously.
  2. Add the UIRefreshControl as a subview on the UICollectionViewController's .CollectionView. 

There you go, now pull down in your UICollectionView in the UI and boom, there you have what you want.

Posted: Aug 20 2013, 05:00 AM by Wallym | with no comments
Filed under: , ,
More Posts