Skip to main content


Showing posts from January, 2012

Silverlight RichTextBox Control For Beginners

This post is for the absolute beginner who want to use the RichTextBox control of the Silverlight in their application. So in this post I will show how you can use MVVM pattern to bind the RichTextBox to the properties of the view models and what properties of the RichTextBox are used for binding.You can see in the Image 1 that I have used two way to display text in RichTextBox control. On the left side is the simple string and on the right side is formatted string.
Read More....

Touch typist’s dream keyboard comes to the Mac

Apple users who type like the wind are in luck: Das Keyboard took the wrapper off a Mac-optimized version of its impressive mechanical switch keyboard. In addition to satisfying tactile feedback, the Das Keyboard for Mac has special keys designed for Apple machines and a built-in two-port USB hub.

The Das Keyboard is basically the opposite of Apple's own typing input devices: It's glossy black, imposing and has a distinctive old-school edge, while Apple's keyboard is all lightness and aluminum. But the Das Keyboard is aimed at a particular crowd for whom the overwrought design (the company calls it "Darth Vader approved") is a selling feature, not a downside.

Das Keyboard's main draw is its use of mechanical switch keys, which make the experience of typing particularly rewarding, especially for touch typists whose fingers fly yet depend on some kind of tactile feedback. The company compares the experience to typing on an IBM Model M keyboard, a design some say …

Displaying Notification Messages in a Silverlight Dashboard Application

Displaying Notification Messages in a Silverlight Dashboard Application Nowadays dashboard applications are becoming popular in Silverlight applications. Well Dashboard applications are normal Silverlight application, with a home screen that displays some information about different modules involved in the application. Take an example of a dashboard where all Social Networking sites are in different modules and you need to see the notification or messages pushed to you by the modules. In this article we will see how we could display a notification message and further a list of notification messages. 

Read More from: Original Source

Creating and exploring a 3D maze with Silverlight 5

There's something about mazes than amazes me. They seem simple, but the math behind them can be very complicated (at least for a guy like me). Yet they have a draw that's hard to resist. Then there's the whole being inside of one, working your way out (i.e. just about every adventure game ever written?).

Today's project takes us through not only the creation/generation of a random maze, but how, using the power of the new 3D features in Silverlight 5, we can also explore our creations too.

Read More from: Original Source

WPF Data Binding Tutorial 1

Windows Presentation Foundation (WPF) is ships part of .NET frame work and Develop our GUI application 2D,3D,graphics animation and media content using in this WPF.In advantage of WPF  to less your coding in application.and Easier animation and special effects,Inherent Scalability Inherent scalability The developer has to manually write the Code update each UI Elements That Display value stored in the object member .In WPF you can less your code greatly by binding the object directly with the UI using XAML syntax.A developer typically  creates a class to represent an entity (table) in the database,where CRUD operations performed by Calling methods on the objects.I will Converting 3 different approaches for displaying data in the object onto the UI using WPF   Basic of WPF Binding   Using c#[INotifyPropertyChanged]   Using c# and XAML[INotifyPropertyChanged and XAML]Read More....

A WPF Custom Control for Zooming and Panning

This article examines the use and implementation of a reusable WPF custom control that is used to zoom and pan its content. The article and the sample code show how to use the control from XAML and from C# code.

The main class, ZoomAndPanControl, is derived from the WPF ContentControl class. This means that the primary purpose of the control is to display content. In XAML, content controls are wrapped around other UI elements. For example, the content might be an image, a map or a chart. In this article, I use a Canvas as the content. This Canvas contains some colored rectangles that can be dragged about by the user.
Read More....

Code analysis using Telerik JustCode

JustCode do on the fly analysis of the code. It does code analysis when you type the code and reports you and error or warning without any further delay.
You can download Telerik JustCode 60 days-trial version with dedicated support here
To have high lever perspective on Telerik JustCode, I have just console application and put no code so far.
Read More....

How to convert a Silverlight application to out-of-browser application?

In this article, we are going to learn how to work with Out-of-browser application in Silverlight.

Out-of-browser application

Out-of-browser application is a Silverlight application that can be installed from the running Silverlight application in the browser to the local computer.

After installation, it can be run from the local machine by clicking its icon rather than launching from browser as if it is a desktop application.
Read More....

WP7 and PhoneGap - Article #7 - Check for Network Connections

Learn the basics of getting a minimal application packaged for the Windows platform using the Intel AppUp™ encapsulator tool. Develop HTML5 applications for the Intel AppUp center - Learn More

If you want to find out the connection information of your Windows Phone using PhoneGap you can use the connection object .
Read More from: Original Source

How to access a video and snap a picture from webcam in Silverlight?

In this article, we are going to learn how to interact with Audio and Video devices in Silverlight

Working with Audio and Video devices in Silverlight

Silverlight 4 allows us to easily work with the video and audio devices of the system. In order to control the audio and video devices user need to right click the Silverlight page in the browser and click and Webcam / Mic that list all default audio and video devices.
Read More....

WP7 Mango Sample: Database Part 1:2

Storing Windows Phone application data is a pretty normal requirement. If you want it to persist across sessions, or even phone reboots, you really have three options:

- Save to the Cloud
- Save to Isolated Storage
- Save to Local Database

Each is correct for certain scenarios. But in this article, I will ONLY walk through the Local Database. This is an enhanced version of SQL CE – meaning your SQL skills are an asset. And, if you don't have them, they come quickly.
Read More from: Original Source

Silverlight File Manager

The Silverlight File Manager on the ListBox control based universal server handler may be working on the ASP .NET WebForms and MVC projects. All requests are sent asynchronously via helper class.
Silverlight applications have no direct access to the file system of server. To gain access to the server file system needs to be done the proxy (gateway) page.

I created a gateway class for processing requests. The class can be used in the ASP .NET WebForm and ASP.NET MVC projects.

File Manager is created as custom control based on the ListBox. The control has a method for sending requests to the server.

All requests are sent asynchronously via helper class. The helper class is optimized for File Manager, but it can be easily modified for other purposes.

Data exchange is carried out in the JSON. Is it optimal for traffic volume.
Read More....

LINQ Group By with NULL database values

LINQ is fantastic for the ability to write queries that express intent much more clearly than the same SQL, or structured code. One problem that I have run into though is handling NULL database values that are part of a group by statement.

Grouping by ProductSKU

Grouping in LINQ allows you to return sets of data from a collection for a given key value. The group by clause is what the key ends up being in the result set. Let's take a grouping of the Products by the SKU.
Read More....

Top 10 tips and tricks to jazz up your C# business solutions/server products

After the initial lot of tutorials and exercises, when finally I sat down to write my first professional quality C# application, I had to spend some time finding out how routine server related tasks like reading the registry, sending emails, writing to the Windows Event log, getting system information, watching folders etc. are done in .NET.Fortunately, the rewards of the time spent were fantastic. It was wonderful to see the simplicity and elegance of the C# .NET code doing pretty complicated tasks, against the daunting C++/MFC code I used to write earlier for doing the same things.So, I decided to compile this list of ready-to-refertricks.Notes:Sure, you can wade through the MSDN and know all this. But this stuff is for those who are short on time and want ready-to-use simple solutions in a jiffy. You know, the ones whose boss has just yelled �Get me the results! Now!�.I have chucked out the try-catch blocks and comments from the sample code to reduce the size. Please add these life…

Add Twitter Support To Your iPhone App In 5 Steps

Do you know how easy it is to give your users Twitter support in your app. This works like the email function in iOS apps – you will be able to present your user with a model view that is pre-populated with content that will become a tweet that will appear in your user's timeline.
This is what you need to do to add Twitter support to your iOS app:Add Twitter frameworkImport Twitter.hInstantiate TWTweetComposeViewControllerSet initial text, images and URLsPresent TWTweetComposeViewController in a model view controllerHere is an IBAction that I coded that implements this Twitter functionality.-(IBAction)tweetTweet:(id)sender {NSLog(@"%i", [TWTweetComposeViewController canSendTweet]); TWTweetComposeViewController *tweeter = [[TWTweetComposeViewController alloc] init]; [tweeter setInitialText:self.myTextField.text]; [self presentModalViewController:tweeter animated:YES]; }

How to create and consume WCF Service in Silverlight?

As we know that Silverlight (being a sandbox technology) doesn't support working directly with ADO.NET, it implies that you can't use ADO.NET code like SqlConnection, SqlCommand or SqlDataAdapter to connect to the database and fetch records or manipulate records. So the only option left is to interact with the services (either web or wcf).

NOTE: In case you are creating services in different project than the Silverlight hosting project, you need to specify the client access policy (in the client/consumer project) and cross domain policy (in the server project).

This article is the continuation of my last article in Silverlight controls series, read last article here.
Read More....

WP7 Tips: How to Pin an Application to the Start Screen?

Today in this blog post, I am going to start up few Windows Phone 7 tips which will be handy for you if you are a beginner and just started exploring your device.
In this first tips & tricks, I will show you how to pin an application from your application list to the start screen of your Windows Phone 7 device. As I told, this post is absolutely for the beginners.
Read More....

Binding data to the Silverlight control by hard coding in XAML file and programmatically from the code behind

Data binding is the process that establishes a connection between the application UI and business logic. If the binding has the correct settings and the data provides the proper notifications, then, when the data changes its value, the elements that are bound to the data reflect changes automatically. Data binding can also mean that if an outer representation of the data in an element changes, then the underlying data can be automatically updated to reflect the change. For example, if the user edits the value in aTextBox element, the underlying data value is automatically updated to reflect that change.For more visit here.
Read More....

iOS Development Resources

Below is a list of online resources I have found incredibly useful whilst climbing the Xcode / iOS learning curve. If you've got others please let me know in the comments! Apple resourcesiOS Dev Center
This is pretty much your central bookmark for all things Apple / iOS related. You'll be given access to different types of resource depending on the type and details of your developer account (e.g. iOS Beta downloads are only made available to paid-up, confirmed developers)Xcode 4.2 on the Mac App Store
Note: you'll only be able to get Xcode from the MAS if you're running OS X Lion. If you're still on Snow Leopard then grab it from the iOS Dev Center. iOS Human Interface Guidelines
The essential design guide for app developers. Read and digest before writing your first line of code!  Developer links and blogs. (Note: many links on this list has been sourced from this post on ClingMarks.)Ray Wenderlich | Tutorials for iPhone / iOS Developers and GamersiCode[blog]

What is Garbage collection?

Garbage Collection:
The .NET Framework uses automatic garbage collection to manage memory for all applications. When you use the new operator to create an object, the object's memory is obtained from the managed heap. When the garbage collector decides that sufficient garbage has accumulated that it is efficient to do so, it performs a collection to free some memory. This process is fully automatic, but there are a number of factors that you need to be aware of that can make the process more or less efficient. To understand the principles of garbage collection, you need to understand the life cycle of a managed object:
1. Memory for an object is allocated from the managed heap when you call new. The object's constructor is called after the memory is allocated. 2. The object is used for a period of time. 3. The object dies due to all its references either being explicitly set to null or else going out of scope. 4. The object's memory is freed (collected) some time later. After t…

What is Constructor Chaining in C#?

Constructor chaining is an approach where a constructor calls another constructor in the same or base class. You can't call constructors inside other constructors. A constructor can only chain another constructor to be called directly before it
First I would like to explain why need to Constructor chaining. Let take an example with Employee class.

class Employee { string _employeeType = ""; string _id = ""; string _fName = ""; string _lName = "";
public Employee (string id) {
_employeeType = "<employee_type>"; _id = id;
public Employee (string id, string fName) { _employeeType = "<employee_type>"; _fName = fName; _id = id;
public Employee (string id, string fName, string lName) { _employeeType = "<employee_type>"; _id = id; _fName = fName; _lName = lName; } }

This code is not used the constructor chaining but here is the issue with duplicate code. This is where constructor chaining is very useful. It will eliminate…