Tag: Windows Phone

The use of C# will continue to fall, along with the eventual extinction of VB.NET

The use of C# will continue to fall, along with the eventual extinction of VB.NET

C# is a modern programming language that runs on the Microsoft.NET Framework. Just a few years ago being a C# developer allowed you to use your skills across multiple technologies that were in relatively high demand. You can use C# writing a desktop application using WinForms or WPF, or write the server side code for web site using ASP.NET or ASP.NET MVC. A developer could also write a rich internet application with Silverlight technology in C#. Things have changed in the last few years as many of these technologies are becoming irrelevant.

With Windows 8 coming onto the scene Microsoft has de-emphasized the desktop experience, wanting users to do most of their work with Windows 8 applications in the tile mode. Desktop based browsers are slimming down and halting support for some third party plugins. The combination of this shift has left WinForms, WPF and Silverlight out in the cold. What’s left for developers on the PC is Windows 8 apps, which can also be written in javascript or C++. Windows 8 apps are not a priority for most companies as Windows 8 still has a very small tablet market share.

Windows 8 Phone is another potential target for C# developers, but with market share in the low single digits there isn’t much demand for developers writing a Windows 8 Phone app. Windows Phone 8 now also supports native C++ apps, and I’m guessing they won’t want to be supporting Silverlight on the phone for future versions.

Server side C# for ASP.NET MVC web applications is still very popular as many companies are still running Windows based servers. This will slowly shift as more companies move their servers from on-premise to cloud hosted. Many new web sites are written in mostly javascript with the rise of rich client side frameworks like Angular and server side technology with node.js. Which leads me to my point about the extinction of VB.NET…

Nobody writes VB.NET on the server! If they do, they probably don’t belong in our society.

It will be interesting to see what Microsoft does with C# in the coming years. It’s already a very powerful and flexible language so they may well leave it alone for a while. On MSDN C++ has been getting a lot of love in their monthly tech how-to articles. It seems they are trying to steer developers to use C++ as their primary language choice.

A recent article on Dr. Dobbs has C# as a rising language, but I don’t think it can keep holding its own with the main uses being Xamarin and MVC server side code.

As a developer who is strong in .NET and relies on that technology for a career, it will be worth taking a look at where you think the market for developers is headed. I believe that if you are strong in javascript, Objective-C, Swift, C++ and Java your future looks brighter than only knowing C#. One of the challenges developers face is keeping up with technology and adapting. This is clearly a time for .NET developers to realize what they can do to still keep their skills competitive and in demand.

Installing the Nokia Imaging SDK

Installing the Nokia Imaging SDK

Working with the Nokia Imaging SDK isn’t as easy as just installing the NuGet package. There are 2 dlls that will likely not be reference properly.

  • Nokia.Graphics.Imaging
  • Nokia.InteropServices.Runtime

If you try and add them manually you may get an error message like this: A reference to a higher version or incompatible…

Nokia has a post on how to solve this problem. The key is to remove Any CPU from your build configuration, and then close and re-open the solution.


How long can companies ignore the Windows Phone platform?

How long can companies ignore the Windows Phone platform?

This original post was written for the Aspenware blog


The Windows Phone platform initially launched in October of 2010. The new Windows Phone 7 operating system broke compatibility with early versions of Windows Mobile which left Microsoft starting from ground zero in terms of market share and apps.

Shortly after the initial launch Microsoft partnered with Nokia to build phones for its new mobile operating system. Nokia abandoned Symbian and started making all of its new phones for Windows Phone 7. Nokia has been the saving grace for Windows Phone, even though it hasn’t yet gained any significant market share, especially in the United States.

Currently market share in the US stands at 3.6%. Android and iOS dominate the rest of the market leaving only a shred left for Blackberry. Beginning a few months ago, Windows Phone finally made it to all of the big carriers with the HTC 8x released on the Sprint network. Verizon has had a few phones from Samsung and HTC for the last year or so, with Nokia only offering GSM compatible phones on the T-Mobile and AT&T networks.

As far as app development goes, one can certainly make the case to ignore the platform with only 3.6% market share in the US. Twitter and Facebook have not developed their own apps for Windows Phone as of yet. Microsoft has released their own version of a facebook app, along with many other third party developers. With so many different third party developers supporting the platform, it probably doesn’t make sense for Facebook to support their own native app at this point. That being said, it’s still somewhat of a blemish for the Windows Phone Marketplace. So we can start to look to the future to see what’s in store for the Windows Phone platform.

International Data Corporation (IDC) predicts at least a 10% global market share for Windows Phone by 2017. This equates to over 100 million devices being sold per year as they predict global shipments to exceed 1 billion units per year.

The real excitement for Windows Phone is in the international markets, particularly in Europe. In Italy Windows Phone enjoys a 3.5% lead over iOS with a 13.7% market share. Windows Phone is enjoying similar success in Germany as they are neck and neck with iOS for 2nd place behind Android. Overall in the major European markets Windows Phone hopes to grab around a 10% share by years end.

App developers should not be ignoring what is happening in Europe with Windows Phone. Nokia is charging ahead strongly with highly desirable devices, mostly from their advanced camera capabilities. The new Nokia Lumia 1520 boasts a 6” HD screen and 20 MP camera. So far early reviews have been very positive. There’s also been news that the new Nokia phones will support 3D touch, so you can navigate through your phone without actually touching the screen.

What’s happening in Europe will ultimately help the Windows Phone market share in the US. As more and more apps are developed to support the growing customer base in Europe, it will make the Windows Phone platform more appealing to consumers in the US. With Instagram soon to hit the Windows Phone Marketplace, along with Vine just landing in it, Windows Phone will satisfy a broad appeal of consumers with many of the most popular apps now being available on the platform.

Even though the Windows Phone Marketplace will support most of the well-known app brands, it still lacks a lot of what I call ancillary apps which my favorites include: US Bank, Safeway and Golf Channel. These were the apps I used a lot on my old Android phone which are not available yet for Windows Phone. Nokia claims that it is now a matter of when vs. a matter of if major brands are coming to the platform. Once Microsoft can shore up its app store to compete better with Android and iOS, it should be very interesting to see what happens to the market share not only in the US, but with the platform worldwide.

Side Note Version 1.3 Released!

Side Note Version 1.3 Released!

Side Note has been updated to be a much more friendly and appealing user interface. With this new update users can add a little color to their notes, which makes the experience of saving and viewing your notes a little more fun. With 165 downloads over the last 5 days, there is a demand for this kind of capability on phones. People want to keep track of random notes, and they want a simple and efficient way to do so. If you have a Windows 8 Phone, try it out. It’s free!

Side Note
Side Note
Go Native or go HTML5?

Go Native or go HTML5?


I’ve got a new idea for an App, and I’m really good at Windows Phone development, so my first instinct is so start writing the app specifically for that platform. I’m currently trying to decide if that’s a good idea or not. Ideally I’d want my app to work across all 3 major platforms (iPhone, Android & Windows Phone).

To develop specifically for each platform would take a significant amount of time. Each platform uses a different programming language.

  • iOS: Objective-C
  • Android: Java
  • Windows Phone: Silverlight/C#

Being a C# guy, Xamarin looks like a good choice for my app. I’m somewhat dreading developing the app with html and javascript. Not that I don’t know how to develop with that technology, it’s just a little more painful than writing C# and XAML. Once you’ve experienced data-binding with XAML, it’s such a wonderful experience you never want to develop any other way.

As I write this post, I’m still not sure what way I will go. I think I’ll give Xamarin a shot and if that proves to be too painful I’ll probably go the HTML5 route. There’s no way I’m writing a native app for each platform. Maybe I would if I didn’t have a full time job bu the time constraints are too high.

I look forward to your comments on the topic!

Side Bet Version 2.1 Released!

Side Bet Version 2.1 Released!


The latest version of Side Bet for Windows Phone 8 allows you to easily calculate who owes what at the end of the round. No need for player set up or entering in points for each golf hole played. This will be a popular feature for users of the app who aren’t concerned with keeping a history of their games.

Developing a RSS Feed Display in Windows Phone 8

Developing a RSS Feed Display in Windows Phone 8

Pretty much any site that has a blog comes with a RSS feed for free use. To display a RSS feed from a web site in your Windows Phone 8 App is fairly straight forward with the help of the SyndicationItem object in the System.ServiceModel.Syndication dll. Since Windows 8 Apps do not reference this automatically, you’ll likely find it at this location: C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.ServiceModel.Syndication.dll

Once you have the dll referenced you will create a List of of SyndicationItem objects. You can also create a property to bind to the SelectedItem of the LongListSelector. In this property example I am using BindableBase as my ViewModel base class. BindableBase comes with SetProperty to implement INotifyPropertyChanged.

private SyndicationItem _selectedSyndicationItem; public SyndicationItem SelectedSyndicationItem { get { return _selectedSyndicationItem; } set { _selectedSyndicationItem = value; SelectionChanged(); } } private IEnumerable<SyndicationItem> _syndicationItems; public IEnumerable<SyndicationItem> SyndicationItems { get { return _syndicationItems; } set { SetProperty(ref _syndicationItems, value); } }

The rest of the code in my ViewModel handles loading the RSS feed and responding to the SelectedItem binding event. The example here uses the RSS feed from the Colorado Technology Association.

public void LoadRss() { string url = "http://www.coloradotechnology.org/members/blog_rss.asp?id=432063&rss=zGF1zZtI"; try { var request = (HttpWebRequest)WebRequest.Create(new Uri(url)); request.BeginGetResponse(ResponseHandler, request); } catch (Exception exception) { ErrorHandling(exception); } } void ErrorHandling(Exception e) { ProgressVisible = false; ErrorMessage = "An error occured loading the news feed. " + e.Message; ErrorVisible = true; } private void ResponseHandler(IAsyncResult asyncResult) { try { var request = (HttpWebRequest) asyncResult.AsyncState; var response = (HttpWebResponse) request.EndGetResponse(asyncResult); if (response.StatusCode == HttpStatusCode.OK) { var reader = XmlReader.Create(response.GetResponseStream()); var feed = SyndicationFeed.Load(reader); SyndicationItems = feed.Items; ProgressVisible = false; ErrorMessage = string.Empty; ErrorVisible = false; } } catch (Exception exception) { ErrorHandling(exception); } } private void SelectionChanged() { AppSession.RSSUrl = _selectedSyndicationItem.Id; AppSession.RSSTitle = _selectedSyndicationItem.Title.Text; if (NavigationEvent != null) NavigationEvent(this, "/WebArticle.xaml"); }

The remaining implementation is in the xaml, which is shown here:

<LongListSelector ItemsSource="{Binding SyndicationItems}" SelectedItem="{Binding SelectedSyndicationItem,Mode=TwoWay}"> <LongListSelector.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Text="{Binding Title.Text}" Foreground="Chocolate" FontWeight="Bold" FontSize="20" TextWrapping="Wrap"></TextBlock> <TextBlock Text="{Binding PublishDate}" FontSize="14" Margin="0,5,0,8"></TextBlock> </StackPanel> </DataTemplate> </LongListSelector.ItemTemplate> </LongListSelector>

To see how SelectedItem is implemented as a Dependency Property, you can see my article on that here: http://www.new.surfdew.com/?p=181

Upgrading to LongListSelector

Upgrading to LongListSelector

The Windows Phone 8 SDK officially ships with the LongListSelector control.  Microsoft is encouraging developers to use this control instead of the ListBox.  ListBox is still supported, but the control is not optimized for the phone experience.  Read more about the features of the LongListSelector here: http://blogs.windows.com/windows_phone/b/wpdev/archive/2013/05/23/windows-phone-8-xaml-longlistselector.aspx

It’s fairly easy to upgrade your ListBox references to LongListSelector.  You can simply replace ListBox with phone:LongListSelector in your xaml.  There is one thing that Microsoft messed up on though and that is not making SelectedItem a dependency property.  If you’re using MVVM with TwoWay binding, you’re hosed with this out the box control.  Never fear though, the class can be extended to allow for TwoWay binding.  The following is the full implementation of the custom class:

publicclass LongListSelector : Microsoft.Phone.Controls.LongListSelector { public LongListSelector() { SelectionChanged += LongListSelector_SelectionChanged; } void LongListSelector_SelectionChanged(object sender, SelectionChangedEventArgs e) { SelectedItem =base.SelectedItem; } publicstaticreadonly DependencyProperty SelectedItemProperty = DependencyProperty.Register( SelectedItem, typeof(object), typeof(LongListSelector), new PropertyMetadata(null, OnSelectedItemChanged) ); privatestaticvoid OnSelectedItemChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var selector = (LongListSelector)d; selector.SetSelectedItem(e); } privatevoid SetSelectedItem(DependencyPropertyChangedEventArgs e) { base.SelectedItem = e.NewValue; } publicnewobject SelectedItem { get { return GetValue(SelectedItemProperty); } set { SetValue(SelectedItemProperty, value); } } }

Windows 8 Phone Databinding

Windows 8 Phone Databinding

I recently began developing an Windows 8 Phone App.  I’m developing the app with Xaml and C#, using the MVVM development pattern.  I came across a pretty cool class that implements INotifyPropertyChanged that’s built for the .NET 4.5 Framework.  The class is simply called BindableBase, and I’m really liking it so far. The class is implemented as follows:

using System; using System.ComponentModel; using System.Runtime.CompilerServices; using System.Windows; namespace MVVM { /// &<summary&> /// Implementation of &<see cref=&quot;INotifyPropertyChanged&quot;/&> to simplify models. /// &</summary&> [Windows.Foundation.Metadata.WebHostHidden] publicabstractclass BindableBase : INotifyPropertyChanged { publicevent PropertyChangedEventHandler PropertyChanged; protectedbool SetProperty<T>(ref T storage, T value, [CallerMemberName] String propertyName =null) { if (object.Equals(storage, value)) returnfalse; storage = value; this.OnPropertyChanged(propertyName); returntrue; } protectedvoid OnPropertyChanged([CallerMemberName] string propertyName =null) { var eventHandler =this.PropertyChanged; if (eventHandler !=null) { if (Deployment.Current.Dispatcher.CheckAccess()) { eventHandler(this, new PropertyChangedEventArgs(propertyName)); } else { Deployment.Current.Dispatcher.BeginInvoke(() =&gt; { eventHandler(this, new PropertyChangedEventArgs(propertyName)); }); } } } } }

To invoke the PropertyChanged Event, simply call the SetProperty method. It’s nice because you can do it all in one line of code in the setter.

private IEnumerable<SyndicationItem> _syndicationItems; public IEnumerable<SyndicationItem> SyndicationItems { get { return _syndicationItems; } set { SetProperty(ref _syndicationItems, value); } }

Side Bet Version 1.5 Released

Side Bet Version 1.5 Released

The latest Side Bet for Windows Phone release now has a list of golf betting games to browse through before you play your round.  From the main screen choose the “Betting Games” option, and then you will be presented with a list of games you can play.  Side Bet supports all golf betting games because the point system is designed generically.  The list of games is there to simply educate users of the app on how to play the different betting games.  You can download the latest update here.  Enjoy!