Welcome to WindowsClient.net | Sign in | Join

Articles

Sponsors





  • advertise here

July 2007 - Posts

Regex Validation in WPF
This article demonstrates how regular expressions can be used to validate user input in a Windows Presentation Foundation (WPF) application. The technique presented herein provides two ways for a developer to validate the text of a TextBox via regular expressions: explicitly adding a ValidationRule-derived object to the ValidationRules of a Binding, or simply using attached properties of a static service provider class. This code was compiled and tested against the June 2006 CTP of .NET Framework v3.0, but should work properly in later builds of the framework, as well.
How to provide friendly help to both ASP.NET Web Application
Who are you? - You produce high quality applications but you suffer from that your applications have much small market share if compared to lower quality competitive applications? - You waste resources on supporting the customers of your applications much more the resources you used to produce the entire application itself? - Your customers typically complain that they are unable to take the full advantage of your applications features and that the value your promised them is not that efficient? If you are any of those above, then please read on ... Providing friendly help can be a simple, yet intelligent, saver from these nightmares.
Debugging Windows Forms Run-Time error 101 using C#
How often do you hear from your pear, "I'm busy debugging my code"? Well, as I can see debugging and code development goes hand-in-hand for every developer. Although debugging is becoming easier and innovative every passing release of VS 2005; beginner level developers still find it challenging. Here is my take on debugging 101. In this article, I'll show you, a simple step-by-step tutorial to find bug and go one step ahead to become a code warrior! I assume the reader has the basic understanding of the Visual Studio (VS) 2005 IDE. You should also comfortable writing code with C#.
Meet DependencyObject and DependencyProperty, the .NET Data-Binding Boosters
With the introduction of the .NET 3.0 Framework, Microsoft made the DependencyObject and the DependencyProperty fundamental concepts, placing them at the forefront of development. Using these two items in conjunction enables .NET developers to expose some of the powerful features of the Windows Presentation Foundation (WPF). In the meantime, data binding has proven to be a valuable construct within the development world. This article introduces data binding and explains how it can be effectively implemented using the DependencyObject/DependencyProperty within the WPF.
Playing around with WPF/GDI+ Resource interop
The other day I ran into a situation where I wanted to potentially display an image in either WPF or in GDI/GDI+. I wanted to have one way to specify the image, but the flexibility to use either technology to render the image. The solution? Use WPF’s new URI syntax and the helper methods on WPF’s application class to load the resource into a stream, then use the System.Drawing.Bitmap constructor that takes a stream.
Custom TreeView Layout in WPF
This article discusses how to customize the item layout in a WPF TreeView. The layout we will examine is quite similar to an "org chart", where each level of items is displayed in a horizontal row directly beneath their respective parent. Along the way we will see how the power of templates and styles in WPF can provide incredible flexibility for customizing an application's user interface. This article is not for WPF beginners. It assumes that you already have knowledge of XAML, control templates, styles, triggers, hierarchical data templates, data binding, and other fundamentals of WPF.
Switching the views and Sorting the ListView control
ListView is a Windows control that enables you to display a collection of items in multiple columns. It has four views and a built-in Sort method with limited functionality. This article uses a ContextMenustrip to demonstrate how to switch from one view to another. It also shows you how to implement the IComparer interface to perform a better way of sorting.
WPF Styles and Control Templates
In a word processing document, a "style" is a set of properties to be applied to ranges of content—e.g., text, images, etc. For example, the name of the style I’m using now is called "Normal,Body,b"” and for this document in pre-publication, that means a font family of Times, a size of 10, and full justification. Later on in the document, I’ll be using a style called "Code,x,s" that will use a font family of Courier New, a size of 9, and left justification. Styles are applied to content to produce a certain look when the content is rendered. In WPF, a style is also a set of properties applied to content used for visual rendering. A style can be used to set properties on an existing visual element, such as setting the font weight of a Button control, or it can be used to define the way an object looks, such as showing the name and age from a Person object. In addition to the features in word processing styles, WPF styles have specific features for building applications, including the ability to associate different visual effects based on user events, provide entirely new looks for existing controls, and even designate rendering behavior for non-visual objects. All of these features come without the need to build a custom control.
Text Metrics in the .Net Framework, Part II
In the first article of this series, we looked at some of the metrics that the .Net Framework provides to assist you with text placement. In this second and final article we will see how these tools and some creativity can be combined for really precise placement.
Text Metrics in the .Net Framework, Part I
I think that the tools that the .Net Framework provides for text output are truly impressive. Even so, the precise positioning of text remains problematic. This is the first of two articles that explore tools and techniques for positioning text output. Let's start with some background.
Build a simple watermarking utility in C#
This article shall describe an approach to building a simple watermarking utility that may be used to add watermarks to any supported image file format. The resulting application shall permit the user to open any supported image file format into a scrollable picture box, to define the text to be applied as a watermark (with a default version supplied), to set the font and color of the watermark, to define the opacity of the watermark, to determine whether or not the watermark appears at the top or bottom of the image, and to preview the watermark prior to saving it to the image.
Use Windows Forms Application Settings to Personalize Your Applications
Application Settings is a new feature in Windows Forms 2.0 that allows you to maintain both user- and application-specific data (known as settings). Find out how to use it to improve your application's usability with personalization.
Add Video To Controls And 3D Surfaces With WPF
When the buzz surrounding Windows Presentation Foundation (WPF) began circulating throughout the Adobe Flash community, my initial reaction was one of skepticism. That Microsoft had introduced a competing technology led many Flash developers, including myself, to lash out against the company in support of our beloved platform. Then I received an e-mail message saying that Microsoft was sending a technical evangelist to the frog design studio in San Francisco to demo Windows® Presentation Foundation, and I saw it as a perfect opportunity to show everyone why Flash was superior in every way. Halfway through Karsten Januszewski's presentation, he showed off the now-famous North Face demo (channel9.msdn.com/Showpost.aspx?postid=116327), which features a 3D carousel in which curved 3D mesh objects are mapped with high-quality Windows Media® Video (WMV) clips. The demo was created jointly by Fluid, an interactive studio also located in San Francisco, and members of the Microsoft Windows Presentation Foundation team. My prejudices were obliterated as reality set in. This type of presentation would be difficult or impossible to accomplish with Flash-or any other platform for that matter.
Events in Windows Presentation Foundation
The way that events are handled in user interface is enhanced in Windows Presentation Foundation and .NET 3.0. Different routing strategies, different event argument types and different events let you to build powerful user interfaces which were so hard to build with older graphic user interfaces. In this article Keyvan discusses about events in Windows Presentation Foundation and some related topics.
Hello World with Microsoft Acropolis – Part Two: Services Dependencies
The post shows how to use Acropolis services dependencies.
Next page »
Page view counter