Files
Emmanuele Sassi dd86214dfb EgwWPFBaseLib 3.1.1.2:
- trasformato parametro AdjustColumnIndex del ColumnLayout in opzionale
2026-02-03 17:04:55 +01:00

170 lines
4.6 KiB
VB.net

Imports System.ComponentModel
Imports System.Runtime.CompilerServices
Public Class ColumnLayout
Implements INotifyPropertyChanged
Public Property Key As String = ""
Private _widthValue As Double
Public Property WidthValue As Double
Get
Return _widthValue
End Get
Set(value As Double)
_widthValue = value
NotifyPropertyChanged()
End Set
End Property
Private _widthUnitType As DataGridLengthUnitType = DataGridLengthUnitType.Pixel
Public Property WidthUnitType As DataGridLengthUnitType
Get
Return _widthUnitType
End Get
Set(value As DataGridLengthUnitType)
_widthUnitType = value
NotifyPropertyChanged()
End Set
End Property
Private _isVisible As Boolean = True
Public Property IsVisible As Boolean
Get
Return _isVisible
End Get
Set(value As Boolean)
_isVisible = value
NotifyPropertyChanged()
End Set
End Property
Private _sortDirection As Nullable(Of ListSortDirection) = Nothing
Public Property SortDirection As Nullable(Of ListSortDirection)
Get
Return _sortDirection
End Get
Set(value As Nullable(Of ListSortDirection))
_sortDirection = value
NotifyPropertyChanged()
End Set
End Property
Private _canUserResize As Boolean = True
Public Property CanUserResize As Boolean
Get
Return _canUserResize
End Get
Set(value As Boolean)
_canUserResize = value
NotifyPropertyChanged()
End Set
End Property
Private _canUserReorder As Boolean = True
Public Property CanUserReorder As Boolean
Get
Return _canUserReorder
End Get
Set(value As Boolean)
_canUserReorder = value
NotifyPropertyChanged()
End Set
End Property
Private _canUserReorderUserEditable As Boolean = True
Public Property CanUserReorderUserEditable As Boolean
Get
Return _canUserReorderUserEditable
End Get
Set(value As Boolean)
_canUserReorderUserEditable = value
NotifyPropertyChanged()
End Set
End Property
Private _canUserSort As Boolean = True
Public Property CanUserSort As Boolean
Get
Return _canUserSort
End Get
Set(value As Boolean)
_canUserSort = value
NotifyPropertyChanged()
End Set
End Property
Private _origIsReadOnly As Boolean = False
Private _isReadOnly As Boolean = False
Public Property IsReadOnly As Boolean
Get
Return _isReadOnly
End Get
Set(value As Boolean)
_isReadOnly = value
NotifyPropertyChanged()
End Set
End Property
Public Sub ResetIsReadOnlyToOrig()
IsReadOnly = _isReadOnly
End Sub
Private _isVisibilityUserEditable As Boolean = True
Public Property IsVisibilityUserEditable As Boolean
Get
Return _isVisibilityUserEditable
End Get
Set(value As Boolean)
_isVisibilityUserEditable = value
NotifyPropertyChanged()
End Set
End Property
Private _AdjustColumnIndex As Integer = -1
Public Property AdjustColumnIndex As Integer
Get
Return _AdjustColumnIndex
End Get
Set(value As Integer)
_AdjustColumnIndex = value
NotifyPropertyChanged()
End Set
End Property
Sub New()
End Sub
Sub New(Key As String, WidthUnitType As DataGridLengthUnitType, WidthValue As Double, IsVisible As Boolean, SortDirection As Nullable(Of ListSortDirection), CanUserResize As Boolean, CanUserReorder As Boolean, CanUserSort As Boolean, IsReadOnly As Boolean, IsVisibilityUserEditable As Boolean, CanUserReorderUserEditable As Boolean, Optional AdjustColumnIndex As Integer = -1)
_Key = Key
_widthUnitType = WidthUnitType
_widthValue = WidthValue
_isVisible = IsVisible
_sortDirection = SortDirection
_canUserResize = CanUserResize
_canUserReorder = CanUserReorder
_canUserSort = CanUserSort
_origIsReadOnly = IsReadOnly
_isReadOnly = IsReadOnly
_isVisibilityUserEditable = IsVisibilityUserEditable
_canUserReorderUserEditable = CanUserReorderUserEditable
_AdjustColumnIndex = AdjustColumnIndex
End Sub
Public Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged
Public Sub NotifyPropertyChanged(<CallerMemberName> Optional propName As String = Nothing)
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
End Sub
End Class