April 1, 2008

WPF Meets the iPhone

he iPhone is one of the most compelling and exciting user interfaces to appear on any consumer electronic device, with many innovations that make it a pleasure to use. This article demonstrates how you can implement these features in your .NET applications in a step-by-step format as you recreate the

Get Proper Filtered Results from a Data View

Ever notice how your data isn’t filtered properly even though you’ve set the Row Filter Expression correctly? For example, suppose you have this code: DataView dv = ds.Tables[0].DefaultView; dv.RowFilter =”location=11″; foreach(DataRow dr in dv.Table.Rows){ Response.Write(dr[0].ToString()+”&ltbr&gt”);} This will display all records. To get the actual result, loop through the DataView itself,

Apply an Identical Transformation to a DOM Tree Using TrAX

To test your TrAX application without involving your live business processes, simply build an identical transformation. You can do this using the newTransformer() method?without any arguments. The following code is a full example that applies an identical transformation to a DOM tree: //the XML file for this example is named

Passing Strings Between Delphi DLL and VBA

Unlike other routines, this one doesn’t need to pass the length of the returned string for later trimming in VBA. This is because the Delphi function also tricks VBA into “thinking” the returned string is Length(tmpStr) long when, in reality, it is really still 100-characters long. The trick has to

The Easiest and Most Efficient Way to Modify XML Documents

The easiest most and most efficient way to update XML documents is to use non-extractive parsers (such as VTD-XML) because they support incremental content update. Suppose you have the following XML document, named test.xml. Below is a snippet that inserts two attribute name/value pairs into an XML document. &lttag&gt hello