Imports Microsoft.VisualBasic
Imports System
Imports DevExpress.ExpressApp.Win.Editors
Imports DevExpress.ExpressApp.Model
Imports DevExpress.ExpressApp.Editors

<PropertyEditor(GetType([String]), False)> _
Public Class SpreadSimplePropertyEditor
    Inherits WinPropertyEditor
    Public Sub New(ByVal objectType As Type, ByVal info As IModelMemberViewItem)
        MyBase.New(objectType, info)
        ControlBindingProperty = "SpreadInfo"
    End Sub
    Private SpreadSimpleUserControlCore As SpreadSimpleUserControl = Nothing
    Public ReadOnly Property SpreadSimpleUserControl() As SpreadSimpleUserControl
        Get
            Return SpreadSimpleUserControlCore
        End Get
    End Property
    Protected Overrides Function CreateControlCore() As Object
        SpreadSimpleUserControlCore = New SpreadSimpleUserControl()
        AddHandler SpreadSimpleUserControlCore.SpreadsheetControl1.CellValueChanged, AddressOf SpreadSheetControl_CellValueChanged
        Return SpreadSimpleUserControlCore
    End Function
    Protected Overrides Sub OnAllowEditChanged()
        MyBase.OnAllowEditChanged()

    End Sub

    Private Sub SpreadSheetControl_CellValueChanged(sender As Object, e As DevExpress.XtraSpreadsheet.SpreadsheetCellEventArgs)
        OnControlValueChanged()
    End Sub

End Class
