Visual Studio Tips and Tricks – Formatting your code


    VisualStudioLogoWith a little setup and a keyboard shortcut you can easily keep your code formatted the way you want it!

    We all have our habits in terms of how we format our code. So why not take 5 minutes to modify the Visual Studio settings so the code looks the way you want all the time! No matter what programming language you work with, there are settings you can control that affect the readability of your code.

    Find more Visual Studio tips and tricks here

    In this post I’ll share tips on how to modify a number of formatting settings, including

    • Fonts and Colors
    • Indenting
    • Spacing
    • Braces
    • Line Wrapping

    Fonts and Colors

    In addition to be able to changing the color theme in Visual Studio, you can also modify the font size or the colors used for different highlighting in your code. If you find the green hard to read for comments, you could change the font size, font color, or background color.

    Just go to Tools | Options | Environment | Fonts and Colors (TIP: if you can’t remember that and are in Visual Studio 2012 or higher you could just use Quick Launch to find the Fonts and colors setting!)



    Indenting code

    Is the indenting too much or too little? You decide. The default indentation and tabs is 4 spaces, but you can increase or decrease the indents. Once again, you want to start in Tools | Options | Text Editor | C# | Tabs



    When you return to your code, you will notice the changes have not taken effect. Just use the keyboard shortcut <CTRL><K><D> anywhere in your code to apply your formatting changes. Here you can see the code with the increased indentation after I apply the changes.


    If you are using the Quick Launch featured just search for “tabs”

    In addition to controlling the number of spaces used when code is indented, you can control what is indented. For example, do you prefer to have your braces indented? or inline with the method declaration?




    Does the opening brace for a method go after the method name or on the next line? I could start a whole debate over that, but instead I’m just going to let you set it up the way you want it to work! You can control where opening braces appear for method declarations, control blocks and more! Just go to Tools | Options | Text Editor | C# | Formatting | New Lines or search for braces in Quick Launch.



    If you make a change in the settings, don’t forget you will have to use the keyboard shortcut <CTRL><K><D> to apply your formatting changes to existing code.


    Did you know you can control whether you have spaces around parameters in method calls, or expressions in your if statements? Once again this is really a question of personal preference, but great that you can control the settings yourself! Just go to Tools | Options | Text Editor | C# | Formatting | Spacing

    Some people prefer spaces around expressions in if statements to make them more readable.



    Line wrapping

    If you grew up coding in C or using Unix you probably love to fit as much code on one line as you can! But some programmers really like to keep code spaced out across line with clear indentation to make code more readable. Once again, it’s all up to you! Just go to Tools | Options | Text Editor | C# | Formatting | Wrapping and pick the settings you prefer.



    Where can I get Visual Studio 2013?

    All the features above are available in earlier editions of Visual Studio, but there is a lot of great stuff waiting for you in Visual Studio 2013. So if you haven't downloaded a copy yet. Download it and start exploring today.

  • Go DevMENTAL

    Watching Sochi Olympics with Windows Phone, Windows 8!


    Looking for a Windows Phone and Windows 8 app to watch the Olympics or track results? Here are some great apps.

    Olympic apps for Windows 8 and Windows Phone

    Download some great apps available to track the Olympics on your Windows Phone and Windows 8 device

    CBC Sochi 2014

    available for Windows 8 and Windows Phone (search on your phone I found it, but couldn’t figure out the URL).

    The CBC Olympics app provides you with full, wide-ranging, dynamic and real-time coverage of the Sochi Winter Olympic Games, including live streaming of all Olympic competitions. It is available in English and French. The displayed version corresponds to the language that you have selected in your device settings.

    Screen shot 1

    Sochi 2014 Results

    official Windows Phone app from the Sochi winter games.

    The Sochi 2014 Winter Games are in your hands! The official Sochi 2014 Results application provides full details of the sports program of the XXII Olympic Winter Games and XI Paralympic Winter Games. Install the application and follow the medal races in real time. Get quick and easy access to the competition schedule and results. Choose the country you’re supporting, compile your information ticker of selected topics and be alerted with the latest news of your favorite athletes!Sochi 2014 Results

    NBC Live Sports app

    which includes Olympic coverage on your Windows and Windows Phone 8 devices. Through the two apps, viewers will have access to more than 1,000 live events with the NBC Sports Live Extra app. Not sure what time the puck will drop for the first U.S. Men’s Hockey team? No worries! With the NBC Sports Live Extra app, you can even receive push notifications for event start times, so you won’t miss any of the events close to your heart.

    • Don’t forget developers in Canada can build and publish their own apps and earn rewards through Developer Movement!

  • Go DevMENTAL

    The Student Guide to Setting Up the Windows 8 & Windows Phone Dev Environment


    To develop Windows Phone or Windows 8 applications, you need to be running Windows 8. Here are instructions to either install Windows 8.1 as your native OS, or install a virtual machine on your OS to run Windows 8.1 and Visual Studio.


    So you want to build a Windows 8 or Windows Phone app. Well, before you jump into the code, you need to get your dev machine ready to play! Don’t know all that much about Windows 8.1, Visual Studio, or App SDKs? Well you’ve come to the right place. Here’s everything you need to know to set up your app dev environment.

    Important Note for Windows Phone development: When developing for Windows Phone you must either 1) run Windows 8 as your native OS, or 2) run it in a virtual machine, but test the app on an actual phone. You CANNOT run the Windows Phone emulator (used to test the app you’re making) on a virtual machine. For full system requirements to run the emulator with Windows 8 as your native OS, see: http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff626524(v=vs.105).aspx

    To get your dev environment set up, simply follow the steps below. Mac users skip to the end, there’s information for you too!

    STEP 1:

    Download and Install Windows 8.1 from DreamSpark Premium:


    STEP 2:

    Search for Windows 8 Pro 64-bit and download

    STEP 3:

    Search for Microsoft Visual Studio 2013 Professional and download/install

    STEP 4:

    For Windows Phone development: Search for and download/install Microsoft Windows Phone SDK 8.0

    And that’s it! Your environment is now set up for development. Be sure to submit your apps to Code Kwondo and Imagine Cup when you’ve published them!

    Did you get stuck? Below are some great installation guides to help you.


    For information on how to dual boot Windows 7 and Windows 8 installation: http://www.intowindows.com/how-to-dual-boot-windows-8-with-windows-7/

    For information on how to install Windows 8 on a VHD (Virtual Hard Drive/Machine):


    For information on how to install Windows 8 from ISO/DVD:


    For information on how to install Windows 8 from USB:



    No fear, even Mac users can develop for Windows Phone and Windows 8! If you are using a Mac you have two options: run the OS and Developer Tools in a Virtual Machine OR use Boot Camp to install as separate bootable partition.

    For information on how to install Windows on Mac based devices, please see:

    Boot Camp: http://www.intowindows.com/installwindows-8-on-mac/

    Parallels: http://www.maclife.com/article/howtos/how_install_windows_8_virtual_machine_your_mac

    Great tutorial for developing Windows Phone apps on a Mac: http://blogs.msdn.com/b/interoperability/archive/2012/12/21/how-to-develop-for-windows-phone-8-on-your-mac.aspx

    Have fun!

  • Go DevMENTAL

    Free Zombie Art Assets to help you build your game

    imageWant to build a game but don’t have the time (or for some of us, the talent) to create the art assets? Check out the free Zombie art asset pack!

    Always wanted to build a game but thought it was too hard?

    Having beautiful art assets gives your game a much more polished look and feel and makes the game more appealing to your players.

    Sometimes you find a few royalty free assets you can re-use on various websites, but we decided to try and help you by providing some themed art assets you can use for your games. No strings attached!

    The art pack contains character sprite sheets, special effects and objects you can use in your game.

    Don’t forget Canadian developers who publish games to Windows or Windows Phone can earn cool rewards through Developer Movement until June 2014.

    This week let’s check out the assets in the Zombie Pack (If you missed it, there is a Fantasy pack and a Space Pack  as well!)

    Characters include a fabulous collection of fourteen different zombies, a few of which are shown below

    image image image image

    There is also a sheriff who can help you defeat the zombies with an assortment of weapons!

    image image image image

    Add a few weapons and obstacles to make the game more interesting

    image image image image

    How about some special effects for blowing up the zombies such as a puff of smoke or a pile of dust or maybe just the classic stars dancing around the head.

    image image image

    You should also download the background assets collection to find a suitable backdrop art for your game as well.

    image image image


    You can find more art asset packs at http://wootstudio.ca/win8platstarter

    Now you have the assets, how do you build your game?

    You might want to check out

    Starter kits


    General resources

    If you build something cool, tell us about it!

    Are you a student?

    If you are a student, you don’t have to settle for the Express version of Visual Studio to develop your game! Use the same tools as the professionals by downloading your copy of Visual Studio Professional at DreamSpark! You can download Visual Studio Professional, the Windows Phone SDK, and the Windows 8 SDK all for free! DreamSpark is the student one stop shop for software!

  • Go DevMENTAL

    Tools to help non coders build apps for Windows 8 and Windows Phone


    Looking for tools to help you build a Windows Phone or Windows 8 app? Here’s a few suggestions

    As Windows 8 and Windows Phone have matured, a number of tools have appeared to help app developers build apps. There are two types of tools generally used to help app builders. Tools that help you target multiple app platforms (cross platform tools) and also tools that will generate apps for a specific platform (app generation tools). This post focuses on app generation tools for Windows Store and Windows Phone. Hopefully over the coming weeks I’ll have a chance to provide more information on each individual tool

    In this post I will introduce the following app generation tools, if you know of any other tools I should mention, let me know and I will add them to the list!

    • Windows Phone App Studio
    • Web Application Template
    • ZipApp
    • Project Siena
    • IdeaPress

    Don’t forget! Canadian Developers can get rewards through their apps through the Developer Movement! With tools like these, even non-coders can explore the world of apps and get cool stuff! Earn points by registering, building an app, or even watching a video to learn more about coding! Register today.

    Windows Phone App Studio

    Creates apps for: Windows Phone

    Required by developer: A browser

    Description: This tool provides you with pre-built templates that you can customize to build beautiful looking apps for Windows Phone. You provide the pictures, the text, and the information, the templates do the formatting and navigation to provide a really nice user experience. Recipes, tourist information, sports teams, lots of templates to choose from!

    windows phone app studio

    Web Application Template

    Creates apps for: Windows Store

    Required by developer:

    • Windows 8.1 – If you have Windows 8, you can find the Windows 8.1 upgrade in the Windows Store on your start screen. If you don’t have Windows 8 yet, students in technical programs can access Windows 8 through DreamSpark Premium if their faculty has subscribed. Otherwise you can download and purchase Windows 8.1.
    • Visual Studio 2013 - Students can get Visual Studio 2013 from DreamSpark, BizSpark and MSDN subscribers can get Visual Studio 2013 through MSDN. Anyone can get Visual Studio 2013 from the Visual Studio download center

    Description: This tool is designed to convert websites into Windows 8 apps. A great tool for anyone who has built a website and wants to explore building a Windows store app. You can use all your existing website functionality and integrate it into Windows. At its simplest you would literally just have an app that shows your website, but if you spend a little time modifying the json file used to customize the template you can quickly integrate features like search, share, and tiles. With a little extra work you can add push notifications and offline content. The perfect first entry to the Windows Store for web developers. Good documentation provided as well! When you install the tool you get a new application template in Visual Studio. Create a new project based on the Web Application Template, then modify the json file to customize your application.

    web application template


    Creates apps for: Windows Store

    Required by developer: A browser

    Description: This tool is design to help you build apps that collect information from different social media sources including Facebook, Twitter, Youtube, and RSS feeds. Choose from a variety of templates for different look and feel. You also have the option of including additional content by creating HTML pages. This is a very easy tool to use. It even generates a package you can submit straight to the store without using Visual Studio.

    Note: You may occasionally get an error or two in the package, so it helps if you can open it up in Visual Studio to make corrections. I’ve helped a few developers who got stuck with ZipApp solutions, but many developers have used this tool with no issues whatsoever and published some very popular apps.


    Project Siena

    Creates apps for: Windows Store

    Required by developer: Windows 8

    Description: Project Siena is a Windows store app that creates Windows 8.1 apps! It is designed to help you create an app to present data. Step one: Identify a data source to make available through the app. You could have data stored in an Excel Spreadsheet, through a REST API (which means there are open data sources you can use), RSS feeds, or SharePoint lists (useful for line of business apps). Step two: Add the data source to your project. Step three: add controls to present the data to the user. There is no coding required. Anyone who is comfortable in Excel and PowerPoint can use Project Siena. There are video tutorials on the website to help you as well.

    Note: When this post was written, the RSS feed was not a live feed, so when you add it as a data source it does not continuously feed new data. The project is still in beta right now and the plan is to add the live data feed in a future update.

    project siena


    Creates apps for: Windows Phone, Android, and iPhone

    Required by developer: Browser and a WordPress site

    Description: IdeaPress allows you to take your WordPress site and make it available as a Windows Phone, Android, or iPhone app. You add a plugin to your Wordpress site. Create a new project on the IdeaPress site and provide the URL to your Wordpress site, design the look and feel of your app, then either download the code and package it for the store, or have the Ideapress team help you publish.


Page 5 of 82 (408 items) «34567»