Back to Devexpress

PopupImageEditSettings Class

wpf-devexpress-dot-xpf-dot-editors-dot-settings-81d18a2c.md

latest4.9 KB
Original Source

PopupImageEditSettings Class

Contains settings specific to the PopupImageEdit editor.

Namespace : DevExpress.Xpf.Editors.Settings

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public class PopupImageEditSettings :
    PopupBaseEditSettings
vb
Public Class PopupImageEditSettings
    Inherits PopupBaseEditSettings

Remarks

DevExpress container controls (GridControl, TreeListControl, and so on) use DevExpress WPF Editors to edit data they display. Each editor has a helper class (a BaseEditSettings descendant) that is responsible for the editor’s functionality. When the same editor is used in multiple locations, a container control uses this helper class to paint its cells. The actual editors are only created when users start to edit, and are automatically deleted when editing is completed.

Refer to the following help topic for more information: Assign Editors to Cells.

For detailed information on the PopupImageEdit editor, refer to the following help topic: PopupImageEdit.

The following code sample demonstrates how to assign the PopupImageEdit editor to GridControl cells:

xaml
<Window ...
        xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">

<dxg:GridControl x:Name="grid">
    <!-- ... -->
    <dxg:GridColumn FieldName="Image">
        <dxg:GridColumn.EditSettings>
            <dxe:PopupImageEditSettings PopupMaxWidth="400" PopupMaxHeight="250" 
                                        ShowMenu="True" ShowMenuMode="Always"/>
        </dxg:GridColumn.EditSettings>
    </dxg:GridColumn>
</dxg:GridControl>
csharp
public class TestData {
    // ...
    public ImageSource Image { get; set; }
}
public partial class MainWindow : Window {
    public MainWindow() {
        InitializeComponent();
        grid.ItemsSource = new ObservableCollection<TestData>(GetData());
    }
    static IEnumerable<TestData> GetData() {
        yield return new TestData() { /* ... */ Image = GetImage("/Images/1.jpg") };
    }
    static ImageSource GetImage(string path) {
        return new BitmapImage(new Uri(path, UriKind.Relative));
    }
}
vb
Public Class TestData
    ' ...
    Public Property Image As ImageSource
End Class

Public Partial Class MainWindow
    Inherits Window

    Public Sub New()
        InitializeComponent()
        grid.ItemsSource = New ObservableCollection(Of TestData)(GetData())
    End Sub

    Private Shared Iterator Function GetData() As IEnumerable(Of TestData)
        Yield New TestData() With {
            ' ...
            .Image = GetImage("/Images/1.jpg")
        }
    End Function

    Private Shared Function GetImage(ByVal path As String) As ImageSource
        Return New BitmapImage(New Uri(path, UriKind.Relative))
    End Function
End Class

Inheritance

Show 11 items

Object DispatcherObject DependencyObject ContentElement FrameworkContentElement DXFrameworkContentElement BaseEditSettings TextEditSettings ButtonEditSettings PopupBaseEditSettings PopupImageEditSettings

See Also

PopupImageEditSettings Members

PopupImageEdit

ImageEdit

DevExpress.Xpf.Editors.Settings Namespace