Embed a ListView inside another ListView for one to many relationships

In the old days (about 16 years ago), FoxPro’s object, containership and inheritance models made it easy to put objects inside other objects. So, for example, a FoxPro grid of Customers could have a column containing a grid of each customer’s orders, and each order, in turn, could have a grid of the order detail…

1

Use colors in WPF to show virtual memory fragmentation

In this post What is your computer doing with all that memory? Write your own memory browser is sample code that shows how to create a WPF grid view of a memory map of a process. You can click on a column header to sort, and you can see the various loaded images and even…

0

Are you running out of disk space? Treemap your files to see what’s eating the most

  I was running out of disk space and wanted to see what was eating the most.   About 6 years ago I wrote a FoxPro version of a TreeMap program that shows a rectangle subdivided into various subrectangles, each proportional to the amount of space taken by files on disk. The old program had…

1

Write your own Linq query viewer

Sometimes you just want to see data in a tabular format. It could be stored in a server somewhere in the cloud, in a SQL server, a FoxPro database, an EntityFramework object, or just a local object. You’d like to see all columns, without having to write code to select each column.   Linq allows…

0

Collect system info for your application’s runtime environment

Often your code gets run on a machine far away and it’s useful to gather some information about that machine automatically, perhaps for error reporting or statistics gathering. This information could include the Operating System version, how much memory, logged in user, etc.   There are various means of gathering such information. Rather than using…

1

Sometimes you want 2 returned values: playing around with Tuples

When writing code in various languages, you’ll write functions from which you get a return value.   Sometimes you’ll want to get 2 return values. A common way to handle this is to use parameters to pass a variable by reference that will get one of the return values. Alternatively, you could use a Structure,…

2

Use a dictionary to help create a mnemonic

I was using a program that was yet another TLA and I wanted to create a mnemonic to help me remember what it was. One of the letters was “k”, so I wanted to find a word that starts with “k”   Simple: load a dictionary, search for words starting with “k” and browse through…

2

Persist user form size and location settings per session

My prior post (Create your own Test Host using XAML to run your unit tests) shows how to create a form and present it to the user. The user can resize and reposition the form, even on a 2nd monitor.   When the user exits the form, we can persist or remember the form size…

1

Use XLINQ to query the references in your project

Visual studio creates project files for you for the  various languages, such as C++, C#, VB. These files are XML format, and can thus be queried.   Try this: open any non-temporary Visual Studio project (see Use temporary projects in Visual Studio), right click on it in solution explorer, choose unload, then right click again,…

2

How to Create dynamic XAML to display arbitrary XML

Here’s a sample of creating dynamic XAML to display arbitrary XML   You can use the XML DataProvider to supply XML data to XAML, a web service, or you can use a Query.  Each way, you can generate XAML dynamically to display the XML. (echoes of XSLT)   I took the prior sample (Create your…

5