Skip to main content

Posts

Showing posts from April, 2011

How to use Application Bar in Windows Phone 7 Application ?

      If you are working with Windows Phone 7, the first thing that you should have noticed is the very own Application bar. Application Bar is present in most of the applications that you use in your Windows Phone 7. This is basically a standard Toolbar with a menu associated with it which allows you to enumerate the commonly used commands in a standard location. While creating your application, Microsoft strongly recommends you to add an application bar, to ensure the user have common behaviour for every application. You can think Application bar similar to TaskBar of windows. Components of Application Bar An application Bar is made up with two components: 1. ApplicationBar Buttons 2. ApplicationBar Menu The applicationbar buttons are always visible for an application which is used to list only the items that needed to be frequently used while dealing with the application. Lets say you create a Text processing application, you can list the File->Ope...

Revisiting C# - Published New Free Ebook

        I just collated some of my posts on C#, and published an Ebook – Revisiting C#. Have a look at the same here.         This book is intended to be a value adding reading material for beginner to intermediate C# programmers. It may also be used for accelerating the learning about new and upcoming features in C#, and also to get an introduction about new libraries in .NET. You may find random articles and alternate perspectives related to various aspects of C# - ranging from delegates, lambdas, fluent interfaces, dynamic features etc. with practical examples. Revisting C# V1.0

Creating Custom Events in C#

First of all, to read and understand this article you should be familiar with these concepts of C# language: Inheritance Events Delegates Just to remind them very quickly: Inheritance is a feature of OOP. You can create a class and then you can create another class which has the same properties and methods of the class it is inheriting from. This could be useful for example when you need to create a class for objects like cars. You create a basic Car class and then you create some classes that inherits from Car, and in their body you add methods and/or properties. The C# syntax for inheriting a class is this: class BaseClass { /*body of the BaseClass here */ } class DerivedClass : BaseClass { /*body of the DerivedClass here */ } Events and delegates are two concepts that very often work together. When something happens on a windows form (like a click, dblclick, changin some text, selecting an item in a combobox, moving mouse, pressing a key and so on) an event is raise...

Get latitude/longitude coordinate when tap event happen with Bing Map Control

       private void googlemap_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)         {                         Point p = e.GetPosition(this.googlemap);             GeoCoordinate geo = new GeoCoordinate();             geo = googlemap.ViewportPointToLocation(p);             googlemap.ZoomLevel = 17;             googlemap.Center = geo;             //---create a new pushpin---             Pushpin pin = new Pushpin();             //---set the location for the pushpin---             pin.Location = geo;             //---add the pushpin to the map---             googlemap.Chi...

WP7 Sample–Create a JPG screenshot of Bing maps control

WP7 Sample–Create a JPG screenshot of Bing maps control Today I saw a colleague ask an interesting question, how do you create a screenshot of a map that can be used in a list as a thumbnail? so I did some digging and came up with this sample that can be downloaded from the link below. http://cid-c6b45be43711d8b8.skydrive.live.com/self.aspx/Code%20Samples/wp7Sample.ScreenshotOfMap.zip In summary for those who don’t want to download the sample app, most of the work is done inside of the “Take picture” button, here is the source: // Store the size of the map control int Width = (int)mapTest.RenderSize.Width; int Height = (int)mapTest.RenderSize.Height; // Write the map control to a WriteableBitmap WriteableBitmap screenshot = new WriteableBitmap(mapTest, new TranslateTransform()); using (MemoryStream ms = new MemoryStream()) { // Save it to a memory stream screenshot.SaveJpeg(ms, Width, Height, 0, 100); // Take saved memory stream and put it back into an BitmapImage BitmapImage i...

AWT and SWING

       (AWT) in package java.awt. When a Java application with an AWT GUI executes on different Java platforms, the application’s GUI components display differently on each platform. Consider an application that displays an object of type Button (package ja- va.awt). On a computer running the Microsoft Windows operating system, the Button will have the same appearance as the buttons in other Windows applications. Similarly, on a computer running the AppleMac OS X operating system, the Button will have the same look and feel as the buttons in other Macintosh applications. Sometimes, the manner in which a user can interact with a particular AWT component differs between platforms.       Together, the appearance and the way in which the user interacts with the application are known as that application’s  look-and-feel. Swing GUI components allow you to specify a uniform look-and-feel for your application across all platforms or to use each...

10 điều mọi Lập trình viên JAVA nên biết

10 điều mọi Lập trình viên JAVA nên biết Kể từ khi  JAVA  được công bố chính thức từ năm 1995, nó đã thay đổi rất nhiều cái nhìn của chúng ta về Hệ Điều hành. Bill Gate đã từng nói đùa rằng, nó – Hệ Điều hành – không phải là phần cứng mà là phần mềm, là tương lai. (It was not about the hardware but the software which will be the future). Một thập kỷ sau, John Gage (thành viên thứ năm của SUN) đã nói, “Mạng là máy tính” (The Network is the Computer). Và điều này đã nhanh chóng được chứng minh trong thế kỷ 21 này. Tuy nhiên, JAVA đã được xây dựng không phụ thuộc vào Hệ Điều hành và được triển khai qua mạng. JAVA với công nghệ Applet đã khai sinh cho những Ứng dụng Mạng Giàu Tương tác (Rich Network Application hay còn gọi là Rich Internet Application – RIA). JAVA không hoàn hảo và chúng ta liên tục có những bản phát hành khác nhau, tuy nhiên JAVA đã khai sinh một ngôn ngữ lập trình cực kỳ phổ biến. Trở lại với nội dung bài viết, tác giả  Armel Nene  (Senior Java devel...
Bài viết này tập hợp các Ebook về WPF, WCF, Silverlight, WorkFlow và ASPNET, đây đều là các công nghệ .Net mới sẽ là xu hướng phát triển trong tương lai, bất cứ lập trình viên .Net nào cũng sẽ cần tham khảo học về chúng để tối ưu hóa các ứng dụng của mình về mọi mặt. Đặc biệt bộ Ebook này là bản tiếng Việt do Microsoft Vietnam phiên dịch từ sách tiếng Anh, nên bạn có thể hoàn toàn yên tâm về tính kỹ thuật của kiến thức trong đó, có source code ví dụ đi kèm. Download ebook  WPF tại đây Download ebook  WCF tại đây Download ebook  Silverlight  tại đây Download ebook  WorkFlow  tại đây Download ebook  ASPNET  tại đây pass giải nén : nghethuatit.com

Top 10 Reasons why HTML 5 is not ready to replace Silverlight

Note: I know this topic is controversial, so I want to preface that this article is meant to be a conversation.  If you don't agree with something or I have information incorrect, please add a comment or e-mail me.  As the HTML 5 spec evolves, I will update this article. "HTML 5 is born old" Update 10/17/2010:  The Silverlight team posted an excellent article on "The Future of Silverlight".  Obviously it is a biased article, but it highlights a lot of the same topics I cover in the HTML 5 versus Silverlight discussion.  The article can be accessed  here .  They highlight the same things you will see below; that Silverlight provides a first-class framework for: premium HD media and streaming, fast release cadance, advanced features that you can use now (multithreading up to 8 cores, GPU acceleration etc.), out of the browser applications etc. Update 10/18/2010: Last week the W3C announced that HTML 5 is not ready for websites, because of compatibility...

Silverlight và HTML 5: Những khác biệt

Mặc cho nhiều thông tin trên mạng khẳng định rằng HTML 5 sẽ thay thế Silverlight, giữa hai công nghệ này vẫn có những khoảng cách nhất định. Chúng ta hãy xem qua những cách biệt này trước khi trả lời câu hỏi: HTML 5 có đủ sức tiêu diệt Silverlight hay không? HTML 5 là phiên bản tiếp theo của chuẩn HTML, hiện vẫn đang được phát triển và dự kiến hoàn thiện vào khoảng năm 2012. HTML 5 nhắm đến việc hỗ trợ tốt hơn cho các ứng dụng đa phương tiện. Một trong những cải tiến đáng kể nhất là việc bổ sung các thẻ mới, bao gồm hai thẻ <audio> và <video> . Với HTML 5, người dùng có thể xem video mà không cần một plugin bổ sung nào (như Flash, Silverlight). Một số nhà sản xuất phần cứng như Apple thậm chí đã tuyên bố chỉ hỗ trợ HTML 5 trong các thiết bị. Những điều này đã gây nghi ngờ về khả năng tồn tại của các RIA Framework, mà trong đó Silverlight là một ví dụ thường được đem ra so sánh. Tuy nhiên trên thực tế, Silverlight vẫn có một số điểm mạnh mà HTML 5 chưa thể bắt kịp. C...

Java hay .NET?

TỔNG HỢP Có rất nhiều bạn đang rất phân vân khi không biết chọn hướng nào, có bạn đã định hướng trước là chọn Java nhưng nghe nói .NET hay quá cũng phân vân, có bạn chọn .NET rồi nhưng lại thấy tiếc, có bạn muốn chọn cả hai thì sợ mình kham không nổi. Chính chủ nhân blog này đã từng gặp phải hoàn cảnh như vậy, nhưng khi đọc qua một số bài viết trên một diễn đàn IT thì tôi mới ngộ ra được nhiều điều. Tôi nghĩ bài viết này cũng rất có ích cho nhiều bạn trẻ khi mới tập tành học lập trình ... Cám ơn các tác giả có nickname YHT và davidex về bài phân tích khá chi tiết này. Bài viết này không nhằm vào mục đích so sánh khía cạnh kỹ thuật giữa hai công nghệ J2EE và .NET mà sẽ đi vào phân tích xem bạn nên chọn hướng nào và tại sao. Khi so sánh giữa sinh viên đại học và sinh viên ở các trung tâm đào tạo (điển hình là ở Đại học Bách khoa Tp.HCM và học viện CNTT NIIT Vietnam) chúng ta thường hay nhắc sinh viên đại học được học nhiều kiến thức nền tảng trong khi sinh viên NIIT lại học chuyên v...