Back to Devexpress

ImageGalleryFolderSettings.ImageSourceFolder Property

aspnet-devexpress-dot-web-dot-imagegalleryfoldersettings.md

latest3.3 KB
Original Source

ImageGalleryFolderSettings.ImageSourceFolder Property

Gets or sets the path to the folder that contains images displayed by the control.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

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

Property Value

TypeDefaultDescription
StringString.Empty

A String value specifying the path to the images.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to ImageSourceFolder
ASPxImageGallery

.SettingsFolder .ImageSourceFolder

|

Remarks

The ImageSourceFolder property specifies the location of the images that are displayed in the control. The corresponding thumbnails are created automatically.

Note

If the ImageSourceFolder property is specified, the binding to a data source and ASPxImageGallery.Items collection are not in effect.

asp
<dx:ASPxComboBox ID="cbSelectFolder" runat="server" AutoPostBack="True" SelectedIndex="0" Caption="Select Folder">
     <Items>
          <dx:ListEditItem Text="Landscapes" Value="~\Content\Images\landscapes\" />
          <dx:ListEditItem Text="People" Value="~\Content\Images\people\" />
          <dx:ListEditItem Text="Photo Gallery" Value="~\Content\Images\photo_gallery\" />
     </Items>
</dx:ASPxComboBox>
<dx:ASPxImageGallery ID="imageGallery" runat="server" Width="100%" />
csharp
protected void Page_Load(object sender, EventArgs e) {
     imageGallery.SettingsFolder.ImageSourceFolder = cbSelectFolder.Value.ToString();
     imageGallery.SettingsFolder.ImageCacheFolder = "~\Thumb\ImageGalleryThumb\";
}
vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        imageGallery.SettingsFolder.ImageSourceFolder = cbSelectFolder.Value.ToString()
        imageGallery.SettingsFolder.ImageCacheFolder = "~\Thumb\ImageGalleryThumb\")
    End Sub

For a full example, see Image Gallery - Folder Binding demo.

See Also

Image Gallery

ImageCacheFolder

ImageGalleryFolderSettings Class

ImageGalleryFolderSettings Members

DevExpress.Web Namespace