First, in case I didn't say so before, I created this by using a component class.
I think I get what you're saying but the fProperties seems to encompass all the dx specific properties of TextEdit, storing them in the repository.
The component library builds, but when I drop the component on a form all the props I set in the subclassed component are ignored, then there is a problem reopening the component in the designer.
The warning I get is this :
WithEvents variable 'fProperties' implicitly defines '_fProperties', which conflicts with a member of the same name in class 'dxTxtC'.
I tried this ( both the commented and uncommented version ) with exactly the same result
Public Class dxTxtC
Inherits MicroFour.StrataFrame.UI.Windows.Forms.DevEx.TextEdit
'Private _myfProperties As DevExpress.XtraEditors.Repository.RepositoryItemTextEdit
'Public Shadows Property myfProperties() As DevExpress.XtraEditors.Repository.RepositoryItemTextEdit
' Get
' '-- Make sure that the base property is set when being evaluated
' If Not MyBase.fProperties.Equals(_myfProperties) Then MyBase.fProperties = _myfProperties
' Return _myfProperties
' End Get
' Set(ByVal value As DevExpress.XtraEditors.Repository.RepositoryItemTextEdit)
' _myfProperties = value
' MyBase.fProperties = Me._myfProperties
' End Set
'End Property
End Class
Also tried this naming the props
_fProperties and
fProperties()In all cases the designer part of the control looks like this :
_
Private Sub InitializeComponent()
Me.fProperties = New DevExpress.XtraEditors.Repository.RepositoryItemTextEdit
CType(Me.fProperties, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'fProperties
'
Me.fProperties.Appearance.Options.UseTextOptions = True
Me.fProperties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far
Me.fProperties.AppearanceDisabled.BackColor = System.Drawing.Color.White
Me.fProperties.AppearanceDisabled.ForeColor = System.Drawing.Color.Black
Me.fProperties.AppearanceDisabled.Options.UseBackColor = True
Me.fProperties.AppearanceDisabled.Options.UseForeColor = True
Me.fProperties.AppearanceDisabled.Options.UseTextOptions = True
Me.fProperties.AppearanceDisabled.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far
Me.fProperties.AppearanceFocused.Options.UseTextOptions = True
Me.fProperties.AppearanceFocused.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far
Me.fProperties.AppearanceReadOnly.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
Me.fProperties.AppearanceReadOnly.ForeColor = System.Drawing.Color.Black
Me.fProperties.AppearanceReadOnly.Options.UseBackColor = True
Me.fProperties.AppearanceReadOnly.Options.UseForeColor = True
Me.fProperties.AppearanceReadOnly.Options.UseTextOptions = True
Me.fProperties.AppearanceReadOnly.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far
Me.fProperties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric
Me.fProperties.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric
Me.fProperties.Name = "fProperties"
'
'dxTextEdit
'
Me.BusinessObjectEvaluated = True
CType(Me.fProperties, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
I'm obviously missing a basic concept here. Should I be just using a the SF wrapper as a model and creating my own wrapper to remove one layer of abstraction?
Since this involves the SF wrapper for the DevEx control, I'd really appreciate it if you could just tell me specifically, for subclassing this particular SF control, what the best approach to take is.
Since DevEx just released all these controls for free, this might be really useful for a lot of us who haven't been using the DevEx stuff up til now.
TIA