Skip to main content
All docs
V25.1
  • RepositoryItemPictureEdit.OpenFileDialogFilter Property

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

    Namespace: DevExpress.XtraEditors.Repository

    Assembly: DevExpress.XtraEditors.v25.1.dll

    NuGet Package: DevExpress.Win.Navigation

    Declaration

    [DefaultValue("")]
    [DXCategory("Behavior")]
    public string OpenFileDialogFilter { get; set; }

    Property Value

    Type Default Description
    String String.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.

    image

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

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

    image

    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