🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
WindowsFileFilter
This page was created by Hans.karlsen on 2021-01-26. Last edited by Wikiadmin on 2026-07-29.

You can control which files a user sees in the WPF file-open dialog for a blob column by setting the WindowsFileFilter tagged value on a ViewModel column that uses a BlobField.

Use WindowsFileFilter

In WPF, add the WindowsFileFilter tagged value to a ViewModelColumn whose field is a BlobField. The value influences the files shown by the file-open dialog when the user selects a file for that column.

  1. Open the ViewModel that contains the BlobField column.
  2. Select the ViewModelColumn for the BlobField.
  3. Set the WindowsFileFilter tagged value to the file filter you want to use.
  4. Run the WPF application and open the file dialog for the column to verify the displayed file types.

For example, to present an image-file choice for a blob column, use:

Image files (*.jpg, *.jpeg, *.jpe, *.jfif, *.png, *.gif) | *.jpg; *.jpeg; *.jpe; *.jfif; *.png; *.gif

Default behavior

The default filter depends on the BlobField's blob type.

BlobField blob type Default file filter
Image *.jpg; *.jpeg; *.jpe; *.jfif; *.png; *.gif
Any blob type other than Image Blank; all files are shown.

Example

Assume that a ViewModel has a BlobField column for a product photograph. If the blob type is Image, the file-open dialog uses the image-file filter by default. If you set WindowsFileFilter on that column, the tagged value controls the filter shown for that column instead.

For a BlobField that is not an Image, no default filter is supplied. Set WindowsFileFilter when you want the file-open dialog to present a specific filter rather than showing all files.

Scope

WindowsFileFilter is described for WPF and affects the file-open dialog used for a BlobField in a ViewModelColumn.

See also