Back to Devexpress

RepositoryItemPictureEdit.OpenFileDialogFilter Property

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitempictureedit-89885492.md

latest3.3 KB
Original Source

RepositoryItemPictureEdit.OpenFileDialogFilter Property

Gets or sets a custom filter for the Open File dialog.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue("")]
[DXCategory("Behavior")]
public string OpenFileDialogFilter { get; set; }
vb
<DXCategory("Behavior")>
<DefaultValue("")>
Public Property OpenFileDialogFilter As String

Property Value

TypeDefaultDescription
StringString.Empty

The Open File dialog’s custom filter. If this property is set to an empty string, the dialog uses a default filter.

|

Remarks

A user can load and save images at runtime via the context menu’s Load and Save commands (see ShowMenu), which invoke the ‘Open File’ and ‘Save File’ dialogs.

The OpenFileDialogFilter and SaveFileDialogFilter properties allow you to specify custom filters for these dialogs.

csharp
pictureEdit1.Properties.OpenFileDialogFilter = "WebP Files |*.webp|" + "Portable Network Graphics Format (*.png)|*.png" ;
vb
PictureEdit1.Properties.OpenFileDialogFilter = "WebP Files |*.webp|" + "Portable Network Graphics Format (*.png)|*.png"

Note

Note that the PictureEdit control does not support the WebP format out of the box. You can add support for this and other formats with the RepositoryItemPictureEdit.ImageLoading and RepositoryItemPictureEdit.ImageSaving events.

See the FileDialog.Filter topic for information on how to set dialog filters.

See Also

ImageLoading

ImageSaving

SaveFileDialogFilter

RepositoryItemPictureEdit Class

RepositoryItemPictureEdit Members

DevExpress.XtraEditors.Repository Namespace