August 2007 - Posts
Enumeration is a great user defined data type in C#.Net and VB.NET. It is very useful in code readability. It greatly increases the readability of code.
XAML element represents the XAML TextBox control. This article discusses how to create a TextBox and set its various properties such as background and foreground colors, setting size and positions, fonts, wrapping, scrolling, and input validations.
This article shows how to connect to a database, get data and display in a DataGridView control using DLINQ and C#. Article also shows how to add, update, and delete data from the database using DLINQ.
This article describes a simple approach to implementing a Windows Forms Trackbar (slider) control in ASP.NET 2.0. In order to deploy a web application that uses the approach defined herein, the end users must use Internet Explorer and must have the Microsoft 2.0 .NET framework installed locally. If you need to deploy a slider type control on other browser types or on machines that lack the current framework, you may wish to pursue an alternative approach.
Aside from simply demonstrating that it is possible to deploy the Trackbar control in an ASP.NET application, the approach described in this article applies to any Windows Forms controls. As with this example application, any deployment of such controls to an ASP.NET 2.0 web application will carry the same requirements that the end users have Internet Explorer and have the 2.0 framework.
Often we need to develop applications where we have to take screenshots of the current screen. So we need a way to take screenshot. I have written code with .NET imaging API which will create a screenshot and save to JPEG format.
I have been thinking a lot recently about the future of software development and where I see it going. I have worked for seven companies since leaving university (two design studios, two software studios, one community startup, one Internet bank and one investment bank), and my conclusion is that all of the SSADM (Structured Systems Analysis and Design Methodologies), or Development Lifecycle, that I learned in university does not work in the real world. Yes, if you can charge your customers two million for an intranet that you will deliver over two years you can do what you like, but these days your customers business moves too quickly for this to work. A solution that was started last year, or the year before in my current company, is obsolete and has to be binned and started again. Or if the business has had its fingers in your specification from the get-go and if they have no idea what "signed-off" means you will get only one result; you will never finish and what you do finish will not meet the business need (80% syndrome).
I’ve been playing around with the RichTextBox, and as Richard points out, the free spell checking on WPF TextBoxes is really cool – especially for the “spelling challenged” such as myself.
The programming model for the WPF RichTextBox is quite a bit richer than the Windows Forms wrapper around the rich edit control – however it’s a bit more complex to work with. I’m still working out all the details of how to work with it, but I thought I’d write down what I’ve figured out:
To get to your actual content, you’ve gotta work with a Document object. This is the place where the actual text content can be manipulated. From here you can get what’s currently selected through the RichTextBox.Document.Selection property, or access “blocks” of text through the RichTextBox.Document.Blocks property.
This article presents a ListBox-derived control which slides its items when they are selected and deselected. The SlidingListBox allows you to customize the animated sliding of its items so that you can make it “feel right” in your applications. The effect provided by the SlidingListBox can help make your user interfaces more intuitive and interactive for the users, which is always a good thing.
The code presented here was compiled and tested against the RC1 of the .NET Framework 3.0.
This article—WPF Concepts—is from Windows Presentation Foundation Unleashed, by Adam Nathan, Daniel Lehenbauer.
I had a plan. I wanted to create a way of accessing services in multiple locations from any location. Each location could have one or more services which may be duplications or different. That is a really abstract way of thing about it, but I eventually came up with a solution.
In this article, I am describing how two data rows swap within a list view by using C#. To solve this task, I searched so many things but did not find a useful link. In the end, I develop own code which performs this task successfully.
Creating an event handler with the Team Foundation Server Event Handlers is very easy. You will need to inherit from the AEventHandler class which is part of RDdotNet.TeamFoundation.dll located in the install directory (I will make an SDK later).
One of the things you hear over and over again with WPF is the ability to do Rich Data Visualization. It has always made me cringe, as it always seems like to fit into that category you need a 3D rotating panda, or some sort of alien chart form that would make Edward Tufte cringe.
The other day, I had a gestalt, with much thanks to Chris Anderson. Six years ago, I was doing a primitive form of “rich data visualization”, I just didn’t know it. In one of my first projects at Microsoft, I was building up a report viewer. I built up an XML data island, an XSLT, and using the magic that is the XSLT transform I created HTML that hydrated an office chart control.
Someone asked me recently how to create a WPF application where the user can drag a blue rectangle around the screen. I solved that puzzle, but kept generalizing the solution until it became possible to drag any UIElement (including Buttons, Images, ComboBoxs, Grids, etc.). This article explores a class called DragCanvas, which derives from Canvas. It enables the user to drag around the objects placed inside of it. The DragCanvas class also provides support for modifying the z-order of the elements it contains (such as ‘bring to front’ and ‘send to back’ operations).
Practical applications for this class might involve a Visio-like scratchpad work area, wherein the user should have complete freedom regarding where the visual objects belong relative to one another. A custom visual designer scenario might also benefit from this functionality.
This code was written and tested against the June 2006 CTP of the .NET Framework 3.0.
This article shows how to create a simple InputBox control similar to the one found in VB.
Next page »