Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » LINQ   (RSS)

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”

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 2 nd monitor. When the user exits the form, we can persist or remember

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
Posted by Calvin_Hsia | 2 Comments
Filed under: , ,

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
Posted by Calvin_Hsia | 5 Comments
Filed under: , ,

Use LINQ to Foxpro or any SQL data and display it in a WPF form using DataSetExtensions and DataRowExtensions

In the last post Create your own media browser: Display your pictures, music, movies in a XAML tooltip , we created a query of your local media and displayed it. Today, we'll make a query to my Foxpro picture database of 28,000 pictures/movies. We'll
Posted by Calvin_Hsia | 3 Comments
Filed under: , , , ,

Create your own media browser: Display your pictures, music, movies in a XAML tooltip

In my prior post , I showed how to use XAML and XAMLReader to create inline XAML to display the results of a query. Today, let's take it a step further: let's create a query of all the media (pictures, movies, music) in your "My Documents" folder and
Posted by Calvin_Hsia | 6 Comments
Filed under: , , , ,

WPF Animation: Use dynamic XAML to animate movies using XAMLReader or animate in code using BeginStoryBoard

Using WPF, it’s great to use declarative XAML , but it’s also great to use dynamic code. With VB’s new XML Features , you can do either. Below is a sample showing how to use XAMLReader to take XML generated in code and use it to create XAML to present
Posted by Calvin_Hsia | 8 Comments
Filed under: , ,

Use the DispatcherTimer, Popup and even a movie to enhance your data presentation

We can subclass the prior Windows Presentation Foundation (WPF) class called Browse that displays the results of a query. This subclass will add a WPF Popup to it. The popup can easily be added to either a ListView or the ListBox sample I posted earlier
Posted by Calvin_Hsia | 4 Comments
Filed under: , ,

Use DataTemplates and WPF in code to create a general purpose LINQ Query results display

In my last post, Use LINQ with WPF : Styles and DataTemplates in code , I showed how to use DataTemplates in code to show the results of a query in a ListBox. Let's make a reusable class called Browse which creates WPF content as a ListView from a LINQ
Posted by Calvin_Hsia | 4 Comments
Filed under: , ,

Use LINQ with WPF : Styles and DataTemplates in code

Using Windows Presentation Foundation (WPF) and LINQ is easy in code. We'll create a query and display it in a WPF ListBox Using XAML is harder: the ObjectDataProvider class works with non-anonymous types. Start Visual Studio 2008 (or 2005 with Visual
Posted by Calvin_Hsia | 12 Comments
Filed under: , ,

Use new XML Features of VB to generate dynamic scripts and text files

There's a very useful feature that FoxPro users have had for over 2 decades: being able to output text in any format, with WYSIWYG and the ability to embed expressions (The TEXT…ENDTEXT command ) Generating XML, HTML, Bat files, PowerShell Script, etc
Posted by Calvin_Hsia | 13 Comments
Filed under: , ,

Querying Northwind with Group By bug fixed

In this post: http://blogs.msdn.com/calvin_hsia/archive/2007/08/17/install-northwind-for-sql-express-and-use-visual-studio-and-dlinq-to-query-it.aspx I mentioned how a bug with Group By and composite keys made more local calculations. Using the AsEnumerable
Posted by Calvin_Hsia | 1 Comments
Filed under: ,

Use Stored Procedures when you can for efficiency

In this post ( Install Northwind for SQL Express and use Visual Studio and DLINQ to query it ) I posted a fairly complex SQL command. Of course, it’s important to keep in mind that a more efficient way of executing this query may be by keeping all the

Install Northwind for SQL Express and use Visual Studio and DLINQ to query it

SQLExpress is free and comes with Visual Studio, but the sample Northwind database isn’t included. You can download sample databases Northwind and Pubs from http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46a0-8da2-eebc53a68034&displaylang=en
Posted by Calvin_Hsia | 6 Comments
Filed under: , ,

Linq Queries for .Net Framework members

How many members in the .Net framework contain the string ‘file” ? Make a query like this: Dim q As Object q = From Assembly In AppDomain.CurrentDomain.GetAssemblies _ From typ In Assembly.GetTypes _ From Member In typ.GetMembers _ Where Member.Name.ToLower.Contains(
Posted by Calvin_Hsia | 3 Comments
Filed under: ,
More Posts Next page »
 
Page view tracker