Jul
13
2012

Code Samples for JavaScript Metro Style Apps

What do most developers want when they need to learn something new?  Most of us want code samples, and feature-targeted ones at that.  Thank goodness you will not have to endlessly search  for Metro style app samples via JavaScript.  If you have downloaded a flavor of Visual Studio 2012, the samples are closer than you may have expected.

Update!

Be sure to checkout the developer center download page for more samples!

The “New Project” dialog box in Visual Studio provides an option to easily access samples as seen in the following screen capture:

javascript-metro-samples

Underneath the “Online” option on the left side of the box, there is a “Samples” option with choice of language. In this example, I chose JavaScript.  Notice the first glimpse of app features just waiting for you to choose. 

Upon selecting a sample, you will get the following dialog box with standard disclaimers:

splash-sample-install

After clicking the “Install” button, the sample you selected will be loaded into solution explorer.  A description page (downloaded as a solution item) will be displayed as seen here:

splash-desc

The sample is ready to go!  You can poke around (code is pampered with comments) or run it immediately.

The main message here is this – before you go searching the web all over for that “how to” sample, you might be pleasantly surprised to see it is already available via Visual Studio 2012!

    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
Apr
20
2012

Windows 8 Anchor Event at Club Nokia

On April 23rd 2012, the Microsoft Evangelism team on the West Coast will join together and present on the topic of Windows 8 and how to start developing for the new platform.  Be sure to follow all the action with this twitter hash-tag #win8appdev.

For more information about this event, check out this blog post from Scott Kerfoot.

    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
Apr
13
2012

JavaScript RegEx Pattern for URLs

Here is a simple JavaScript RegEx pattern for extracting any URL that begins with http:

<script type="text/javascript">

// example string, looks like a tweet to me :)
var str="Awesome resources for HTML5! http://bit.ly/palermo4html5 #HTML5";

// UPDATED 2012-07 thanks to ArthurDent69!
// could also be written as:
// var regexUrl = new RegExp("https?:[^\s]+", "gi");
var regexUrl=/https?:[^\s]+/gi;

// if a match is found, the return type is an array of matches
document.write(str.match(regexUrl));

// output of above line of code:
// http://bit.ly/palermo4html5

</script>
    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
Apr
11
2012

HTML5 Delta Reference

Curious about the changes in HTML5?  The W3C recently published an online reference to easily define the deltas. 
This reference has been added to the popular HTML5 resources on this site Smile 

HTML5Deltas

    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
Mar
29
2012

Unable to Activate Windows Metro Style Application

If you receive the following error in Visual Studio…

“Unable to activate Windows Metro style application”

… or a similar error in Blend…

“Unable to activate application --- on the Local Machine”

… the quickest fix is to delete the contents of the bin directory and rebuild the project.

    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
Mar
22
2012

Sneak Peek at CSS3 Course

Here is a sneak peek of my latest course at Pluralsight regarding CSS3:

[click here for a listing of all my courses at Pluralsight]

    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
Mar
22
2012

AZ MVPs of the Year

Congratulations to all the Microsoft MVPs of the Year!

Two of the MVPs are based right here in Arizona.

Joseph Guadagno was awarded MVP of the Year for C#.  Joe has been an ongoing contributor to the community through is efforts with the Southeast Valley DotNet User Groug (SEVDNUG), Desert Code Camp, AZGiveCamp, and as President of INETA North America (just to name a few).

Joe works full time (like most of us) and still manages to contribute so much to the community.  Congratulations to Joe for being recognized by Microsoft and by his peers a “leader by example” among MVPs.

 

scottcate

Scott Cate was awarded MVP of the Year for ASP.NET.  Scott is well known in the Arizona community.  Scott is a long-time user group leader, and is the founder of AZGroups.org, a site dedicated to listing all the technical user groups (regardless of platform) in Arizona as a service to developers.  Last year, Scott was awarded the title – Microsoft Regional Director.  Scott has been quite active in the southwest region of the USA promoting the Windows Phone Unleashed events.  He is a regular speaker at many technical events locally, nationally, even internationally.

Despite his busy schedule, Scott is devoted family man – always beaming with pride over his children.  Kudos to Scott for being recognized with such a high honor (though no surprise for those who know him).

If you have benefited from the hard work of either of these gentlemen, please enter your comment below!

    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
Mar
19
2012

The Hunger Games–Capitol Tour

The most anticipated movie of the year hits theaters this Friday, March 23rd – The Hunger Games.  If you have read the book (or trilogy), you are probably giddy with excitement to see your favorite characters come to life on screen in a somewhat morbid view of a fictional world of the future.

If you are a fan, you are invited to take the Capitol Tour!  Sign in today to see which district you belong to.  Myself?  Of course I was assigned to District 4.

image_dip

    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).

Resources

Archives

Team Blogs

Download OPML file OPML