SignalR – Lets talk about you and me

So I just did a presentation on SignalR for the Chicago .NET User Group

If you want to check out the slide they are on my skydrive at http://sdrv.ms/1bLoO6R

The code i used in my demos is up on github at https://github.com/AndyConlisk/SignalR-LetsTalkPresentation

If you are in the Chicago area join the meet up chicagodev.net

If you attended, thank you for coming up. If you didn’t come to our next one!

Why I think the Metro Style is important to understand.

So with Windows Phone 8 being announced and Windows 8 also about to come out. They look very similar, and also act similar. The design is the Metro design, and it is different then the other options out there today.

First a little understand about why the metro design is cool, it is designed to be “glanceable,” what this means is they want you to take a look at it and see important information at a glance. When you look at your phone and see see a number next to your email you know you have that many emails. When you check the lock screen of your phone and see a symbol with a number you know you have a message waiting. And to get that nice glanceable design they developed the metro design to make it feel universal. Just image you were in a foreign airport, and not knowing the native language how would you get around? You would look at the symbols and understand what they mean. This is what the metro style was inspired from.

So now why it is important to understand metro design. The whole windows 8 and windows phone experience is built on metro so you should design your apps with that in mind. They make it easy for you to design your app with metro with the blend software that comes with the windows phone SDK. and even give design guides. So when you are building an app for windows phone or windows 8 keep try to make it glanceable, have important information get displayed in the icon. make it smooth and easy to transition.

Check out this blog post by the awesome Jeff Wilcox http://www.jeff.wilcox.name/2011/03/metro-design-guide-v1/ it goes over the metro design basics nicely I think.

Remember Metro is the future, learn to design with metro.

Remember to check your backups

So my old web host just disappeared, and it left me in a hurry to get my website and blog back online. I found a new host and as I was trying to upload the blog database to my new host. My old backup files were corrupt.

So just a nice friendly piece of advice. Remember to always back up your site and database, and check them to make sure they are good.

Creating a Code Repository in DropBox

So something very important to developers is backing up your code, and also version control. In this post I am going to show how to set up a mercurial repository inside a dropbox. This post requires some knowledge of mercurial and or version control. This will enable a version control system inside a dropbox for backup and easy to access on other computers. I am using TortoiseHG for handling mercurial, you can check it out and download it here http://tortoisehg.bitbucket.org/. And for dropbox you can get it here http://db.tt/E3rO0W6E <– (that is a referral link, if you use it you get an extra 500MB of storage and so do I.)

So after you both of those installed (if you are having trouble and need help leave me a comment or send me an email and I will do my best to help you) Go to the folder the project you want to add to version control. Right click in the folder and go to TortoiseHg > Create Repositoy

Read more »

Update to my Trial Mode post

So I just release an app to the marketplace recently. (Check it out here http://underbridgecity.net/underbridgegraffiti/) And I implemented the trial code I mentioned in my Trial Mode post (http://www.underbridgecity.net/blog/2012/03/trial-mode-in-windows-phone-7/) so that when you bought the app and then pressed the back button you should be in full mode and not trial.
I tested it out, and it worked! I went into the app, clicked a button to go to the marketplace to buy it, bought it, went back… and I had to press back an extra time but then went back into the settings page and the app no longer was in trial mode.

So if you implement trial mode, I suggest adding in the check if trial or not in the application activated section to always check when you navigate to the app no matter how you get there.

I will upload a video soon of me buying it.

Multitouch in WP7

I just published an app. (You can check it out here http://underbridgecity.net/underbridgegraffiti/.) Has the ability to allow more then one finger to interact with the screen at one time. Here is how I was able to set it up on a canvas which is set up in the xaml.

So to get multitouch set up I used a TouchFrameEventhandler. You will have to add

as a reference and a using statment.

I created a class called DrawingPoints and then created a list collection of them.

Read more »

My app Under Bridge Graffit was published

Just a small update. My app Under Bridge graffiti was just published in the marketplace. You can check out the page I made for it here http://underbridgecity.net/underbridgegraffiti/

I will soon blog about how I was able to get multi touch set up in the app. Also I am going to test out how I set up trial mode to make sure that if a user hits the back button after buying the app, it checks on activate so you don’t have to restart the app.

Wow I have been busy…

So I have been a bit busy lately. I am sorry I havn’t updated my blog recently, but don’t worry becasue I have been busy and that has given me more topics to blog about.
I just submitted an app to the WP7 marketplace and all I am waiting for is it to get approved (or not and I will have to fix something, but I hope not.)
So I will blog about that app, I will also blog about something I coded into the app that I think is really cool, and I think would be helpful to someone out there.
So stay tuned as a content filled blog will be posted soon.

Thank you,
-Andrew

Different Templates in one Listbox

In this post I will explain how I selected different templates based on the type of data I wanted to show in the same listbox.

Now why might you want 2 different templates in the same list box? Well what if you wanted to display different tasks and appointments for a single day. But you want to see at a quick glance what a task is and what an appointment is. So lets say you have a square for all tasks and a circle for all appointments.

To do this you will use a ContentControl which as the data gets bound to the listbox, we will override the method to check if the item getting bound is a task or appointment. And then set the template depending on what it is.

In my code example the tasks and appointments both inherit from a class called CalendarItem. This is an object orientated programing principle, and if you don’t understand it let me know and I will create a blog about the basics of it.

Read more »

Overwrite WP7 Style Theme

I was working on a Windows Phone 7 application and the client wanted to always have the light theme and have a special accent color depending on settings inside the app. They wanted to do this for branding reasons so I had to find a way to always have this app look like it was in the light theme and override the accent color to the colors they wanted.

I will now go over how I did that. You can use this to always have the light theme for the app like the native mail app, or even create your own custom theme.

In the code I created a method in the App.xaml.cs file, and this method get called in the constructor for App() before the InitializePhoneApplication() call.

You will also need to set teh background on all the pages to {StaticResource PhoneBackgroundBrush} like

I tried to document the code so you can understand what is going on line by line so I will give a little explanation here.

The line

loads the theme you are going override. Here I copied a default theme resource file (Edit: the theme resource file is ThemeResource.xaml) from the design folder located on my machine at C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Design\LightBlue and called it LightTheme.xaml. If you look in the design folder you will see many folders.

Then the code went though all the entries and compared the ResourceDictionaries, if the custom theme file contains the key name of a main style element, it will overwrite it’s brushcolor. If you look at a default theme resource file, it contains a bunch of colors with keys and the keys are pretty self explanatory. So if you wanted to create your own custom theme you can start by copying and editing one of those files.

Also in my code you see me checking a setting value and then overriding the accent color depending and the user setting. This isn’t required unless you want the user to select a special accent colors in the settings or want them to change, if you just want one over ridden accent color just put it into your style resource file.

And questions or comments just let me know and thank you for reading.