Coded - Web Development and Programming Blog

C#, ASP.NET, Google, Remoting, AJAX, Silverlight, Web Development

How to auto zoom and auto center Google Maps

Posted in User Interface, Web Programming by Andrei Alecu on the September 28th, 2007

This post discusses how to auto center and auto zoom a Google Map to display all of the markers optimally.

In order to get accomplish this, you have to calculate the center point and zoom level manually via code. Fortunately this is pretty easy to do, you just need to calculate the minimum and maximum latitude/longitude of all of your markers and then get the center point of the resulting area (which will be a rectangle). (more…)

Bookmark on del.icio.us

Owner-drawing a Windows.Forms TextBox

Posted in .NET Framework, User Interface, C#, SharpSpell by Andrei Alecu on the September 17th, 2007

This article describes how SharpSpell is able to modify existing TextBox controls to display wavy red underlines below misspelled words.

Here’s an image to demonstrate what I mean:

SharpSpell - ASP.NET spell checker
(This image is borrowed from SharpSpell, but you get the point) (more…)

Bookmark on del.icio.us

Google Web Toolkit and ASP.NET?

Posted in User Interface, C#, ASP.NET by Andrei Alecu on the August 29th, 2007

Now that Google’s Web Toolkit is out of beta, I’m looking at ways of integrating it somehow with C# and ASP.NET.

First of all, if you don’t know what Google Web Toolkit is, here’s a quickie: it is a framework for creating Web 2.0 AJAX Web Applications using the Java language, preferably inside an Integrated Development Environment (IDE) such as Eclipse. You then compile this from Java to HTML/JavaScript using the provided tools, and you have a desktop application-like web-page without knowing anything about the W3C DOM, HTML or JavaScript.

What does this have to do with C#?

Well, don’t get me wrong, the ASP.NET AJAX Toolkit is amazing, but being able to visually design a page and use JavaScript behaviors and AJAX from inside an IDE is a step forward.

It seems that Nikhil Kothari from Microsoft is working on a C# to JavaScript compiler, called Script#, as a side project of his. Unfortunately, Script# is not currently supported by Microsoft, and they are really losing ground on the AJAX field because of this. They should promote this to a corporate project, I would love having that same power that GWT has, but directly in the Visual Studio IDE. (more…)

Bookmark on del.icio.us

Green Marinee Wide WordPress Theme

Posted in Web Design, User Interface by Andrei Alecu on the August 28th, 2007

While looking around trying to find a theme for this blog I came across the great Green Marinee Theme theme by Ian Main .

The theme has one flaw:

While I’m pretty sure that back in 2005 screen resolutions such as 800×600 were still common, in today’s world the theme is just too narrow for a big screen display, and too much space is lost.

This is especially a problem with a blog such as mine because I frequently use code samples, and lines can get pretty long.

My update:

So, I decided to keep the theme, but I modified it to make it exactly 200 pixels wider. I also added a Latest Posts display to the right navigation bar to improve the overall usability, and more importantly: Widget Support (more…)

Bookmark on del.icio.us