user17753
user17753

Reputation: 3161

Visual Studio IDE Feature: Filters; What is the Filter property used for?

When you are in a solution and have the "Show All Files" button disabled in the Solution Explorer. You see a logical (filtered) view with some sort of "virtual" folders called filters.

You can add new filters (Right Click Project -> Add -> New Filter). You can add new files under a filter, or drag and drop existing files into an existing filter (they behave much as if they were actual folders).

On the properties page of a filter there's a few properties. Some are self-explanatory:

What I can't understand is the:

For example, a default C++ app might have a Source Files filter with a Filter property of: cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx. However, it doesn't really matter what I change here, I could blank it out, or replace it with something like txt I don't see any differences. I'm not sure how this is even used by Visual Studio, and I could not find any references on its use.

Upvotes: 3

Views: 1548

Answers (1)

Jess
Jess

Reputation: 46

The filter property is used when you add an item to the Project (not to the filter itself). The filter property is used to determine to which filter the new item will be added.

Upvotes: 3

Related Questions